/* DWR Intro Page - Figma Styled CSS */

:root {
    --dwr-blue:      #0152A2;
    --dwr-blue-dark: #1F3C6D;
    --dwr-blue-light:#ECF4FD;
    --dwr-accent:    #4FA5E2;
    --dwr-white:     #ffffff;
    --dwr-gray:      #5A6169;
    --dwr-border:    #E2E8F0;
    --dwr-radius:    8px;
    --dwr-peach-top: #F8E5D6;
    --dwr-peach-bot: #FFFFFF;
    
    /* Royal Tones */
    --dwr-royal-text: #61564C;
    --dwr-royal-line: #D9C3A8;
    --dwr-blue-gradient: linear-gradient(180deg, #4A76A8 0%, #1F3C6D 100%);
}

body.dwr-intro-body {
    margin: 0;
    padding: 0;
    font-family: 'Sarabun', 'Inter', sans-serif;
    color: var(--dwr-gray);
    background: linear-gradient(180deg, var(--dwr-peach-top) 0%, var(--dwr-peach-bot) 50%, var(--dwr-white) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.dwr-signing-body {
    margin: 0;
    padding: 0;
    font-family: 'Sarabun', 'Inter', sans-serif;
    color: var(--dwr-gray);
    background: var(--dwr-blue-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Base Layout Container */
.dwr-intro-layout, .dwr-signing-layout {
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

/* =============================================
   TOP HEADER
   ============================================= */
.dwr-custom-header {
    background: var(--dwr-white);
    padding: 8px 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    z-index: 50;
    position: relative;
}

.dwr-custom-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.dwr-custom-header__logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dwr-blue-dark);
}

.dwr-custom-header__logo .dwr-logo-img {
    height: 48px;
    width: auto;
}

.dwr-logo-text {
    font-size: 11px;
    line-height: 1.3;
    font-weight: 500;
}
.dwr-logo-text strong {
    font-size: 14px;
    color: var(--dwr-blue);
    display: block;
    font-weight: 700;
}

.dwr-custom-header__tools {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dwr-tool-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--dwr-blue-dark);
    font-weight: 600;
    font-family: inherit;
}

.dwr-assist-btn {
    color: #F59E0B;
}

.dwr-tool-divider {
    width: 1px;
    height: 16px;
    background: var(--dwr-border);
}

.dwr-lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dwr-blue-dark);
}

/* =============================================
   INTRO HERO (Full Page Content)
   ============================================= */
.dwr-intro-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    position: relative;
}

.dwr-intro-hero__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.dwr-intro-hero__title {
    font-size: 32px;
    font-weight: 600;
    color: var(--dwr-royal-text);
    margin: 32px 0 16px;
    font-family: 'Sarabun', serif;
    position: relative;
    display: inline-block;
}

.dwr-intro-hero__title::before, .dwr-intro-hero__title::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: var(--dwr-royal-line);
}
.dwr-intro-hero__title::before { right: 100%; margin-right: 20px; }
.dwr-intro-hero__title::after  { left: 100%; margin-left: 20px; }

.dwr-intro-hero__subtitle {
    font-size: 20px;
    color: var(--dwr-royal-text);
    margin: 0 0 16px;
    font-family: 'Sarabun', serif;
}

.dwr-intro-hero__description {
    font-size: 18px;
    line-height: 1.6;
    color: var(--dwr-royal-text);
}

/* =============================================
   BOTTOM ACTION BAR (Footer)
   ============================================= */
.dwr-bottom-action-bar {
    background: var(--dwr-white);
    padding: 24px 40px;
}

.dwr-bottom-action-bar__inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.dwr-bottom-action-bar__logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dwr-bottom-action-bar__logo .dwr-logo-img {
    height: 60px;
    width: auto;
}

.dwr-bottom-action-bar__actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* =============================================
   BUTTONS
   ============================================= */
.dwr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    border-radius: var(--dwr-radius);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: 'Sarabun', sans-serif;
}

.dwr-btn--icon {
    gap: 8px;
}

.dwr-btn--primary {
    background: #3B82F6;
    color: var(--dwr-white);
}
.dwr-btn--primary:hover { background: #2563EB; }

.dwr-btn--secondary {
    background: #1E3A8A;
    color: var(--dwr-white);
}
.dwr-btn--secondary:hover { background: #172554; }

.dwr-btn--dark {
    background: #1E3A8A;
    color: var(--dwr-white);
}
.dwr-btn--dark:hover { background: #172554; }

.dwr-btn--gray {
    background: #9CA3AF;
    color: var(--dwr-white);
}
.dwr-btn--gray:hover { background: #6B7280; }

.dwr-btn--outline {
    background: transparent;
    color: var(--dwr-blue-dark);
    border: 1px solid var(--dwr-blue-dark);
    border-radius: 40px; /* Pill shape for listing button */
    padding: 10px 24px;
    font-size: 14px;
}
.dwr-btn--outline:hover { background: #F8FAFC; }

.dwr-btn--block {
    width: 100%;
}

/* =============================================
   SIGNING PAGE (SINGLE COLUMN LAYOUT)
   ============================================= */
.dwr-signing-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.dwr-signing-card {
    background: var(--dwr-white);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}

/* The hero graphic INSIDE the card for signing page */
.dwr-signing-hero {
    background: linear-gradient(180deg, var(--dwr-peach-top) 0%, var(--dwr-peach-bot) 100%);
    padding: 60px 40px 40px;
    text-align: center;
    position: relative;
}

.dwr-signing-hero__title {
    font-size: 28px;
    font-weight: 500;
    color: var(--dwr-royal-text);
    margin: 24px 0 12px;
    font-family: 'Sarabun', serif;
    position: relative;
    display: inline-block;
}

.dwr-signing-hero__title::before, .dwr-signing-hero__title::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 50px;
    height: 1px;
    background: var(--dwr-royal-line);
}
.dwr-signing-hero__title::before { right: 100%; margin-right: 16px; }
.dwr-signing-hero__title::after  { left: 100%; margin-left: 16px; }

.dwr-signing-hero__subtitle {
    font-size: 18px;
    color: var(--dwr-royal-text);
    margin: 0 0 16px;
    font-family: 'Sarabun', serif;
}

.dwr-signing-hero__description {
    font-size: 16px;
    color: var(--dwr-royal-text);
}

.dwr-signing-form-wrap {
    padding: 40px;
    background: #F3F4F6; /* Light grey form area */
}

.dwr-signing-page__title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dwr-blue-dark);
    margin-bottom: 32px;
    text-align: center;
}

/* Form Styles */
.dwr-signing-form {
    max-width: 700px;
    margin: 0 auto;
}

.dwr-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 24px;
}

.dwr-form-row.align-top {
    align-items: flex-start;
}

.dwr-form-row-center {
    justify-content: center;
}

.dwr-form-label {
    flex: 0 0 180px;
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: var(--dwr-blue-dark);
}

.dwr-form-input {
    flex: 1;
}

.dwr-form-input input,
.dwr-form-input textarea {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: var(--dwr-radius);
    font-size: 14px;
    background: #E5E7EB;
    font-family: inherit;
    transition: background 0.2s, box-shadow 0.2s;
}

.dwr-form-input input:focus,
.dwr-form-input textarea:focus {
    outline: none;
    background: #FFFFFF;
    box-shadow: 0 0 0 2px #3B82F6;
}

.required { color: #EF4444; }

.dwr-field-error {
    display: block;
    font-size: 13px;
    color: #EF4444;
    margin-top: 6px;
}

.dwr-recaptcha-placeholder {
    display: inline-block;
    border: 1px solid #ccc;
    background: #fff;
    padding: 16px 24px;
    border-radius: 4px;
}

.dwr-recaptcha-placeholder__inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.recaptcha-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #666;
}

.dwr-form-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
}

.dwr-form-actions .dwr-btn {
    flex: 1;
    max-width: 250px;
}

/* =============================================
   SLIDESHOW (Image/Video)
   ============================================= */
.dwr-intro-hero__media {
    position: relative;
    width: 100%;
    margin: 0 auto;
}
.dwr-signing-hero__media {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.dwr-slideshow__slides {
    position: relative;
    width: 100%;
}

.dwr-slideshow__slide {
    display: none;
    width: 100%;
    animation: fade 0.5s ease-in-out;
}

.dwr-slideshow__slide--active {
    display: block;
}

@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dwr-slideshow__image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 0 !important;
    clip-path: none !important;
}

.dwr-slideshow__video {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--dwr-radius);
    overflow: hidden;
}

.dwr-slideshow__video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Dots */
.dwr-slideshow__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.dwr-slideshow__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #CBD5E1;
    cursor: pointer;
    padding: 0;
}

.dwr-slideshow__dot--active {
    background: var(--dwr-blue-dark);
}

/* =============================================
   SIGNING COUNT BADGE
   ============================================= */
.dwr-signing-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0D7377;
    color: var(--dwr-white);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    margin: 16px auto 8px;
    letter-spacing: 0.5px;
}

.dwr-signing-count-badge svg {
    width: 20px;
    height: 20px;
    opacity: 0.9;
}

.dwr-signing-count-badge--bottom {
    margin: 24px auto 0;
}

.dwr-signing-count-wrap {
    text-align: center;
}

/* =============================================
   FORM MESSAGE
   ============================================= */
.dwr-form-message--success {
    color: #059669;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    padding: 12px 20px;
    border-radius: var(--dwr-radius);
}

.dwr-form-message--error {
    color: #DC2626;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    padding: 12px 20px;
    border-radius: var(--dwr-radius);
}

/* =============================================
   SIGNING LIST PAGE
   ============================================= */
.dwr-signing-list-wrapper {
    padding: 40px 20px;
    min-height: 60vh;
}

.dwr-signing-list-container {
    max-width: 1100px;
    margin: 0 auto;
}

.dwr-signing-list-header {
    background: var(--dwr-white);
    border: 1px solid var(--dwr-border);
    border-radius: 12px;
    padding: 30px 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dwr-signing-list-header__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dwr-blue-dark);
    margin: 0 0 16px;
}

.dwr-signing-list-header__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.dwr-signing-list-header__count {
    font-size: 16px;
    color: var(--dwr-gray);
}

.dwr-signing-list-header__count strong {
    color: var(--dwr-blue);
    font-size: 20px;
}

.dwr-btn--sm {
    padding: 10px 28px;
    font-size: 14px;
}

/* Table */
.dwr-signing-table-wrap {
    background: var(--dwr-white);
    border: 1px solid var(--dwr-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.dwr-signing-table {
    width: 100%;
    border-collapse: collapse;
}

.dwr-signing-table thead th {
    background: #F1F5F9;
    color: var(--dwr-blue-dark);
    font-weight: 600;
    font-size: 13px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid var(--dwr-border);
    white-space: nowrap;
}

.dwr-signing-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
    font-size: 14px;
    vertical-align: middle;
}

.dwr-signing-table tbody tr:hover {
    background: #F8FAFC;
}

.dwr-signing-table tbody tr:last-child td {
    border-bottom: none;
}

.dwr-signing-table .col-no {
    width: 60px;
    text-align: center;
    font-weight: 700;
    color: var(--dwr-blue-dark);
}

.dwr-signing-table .col-name {
    font-weight: 600;
    color: #1E293B;
}

.dwr-signing-table .col-position {
    color: #475569;
}

.dwr-signing-table .col-org {
    color: #64748B;
    max-width: 250px;
}

.dwr-signing-table .col-date {
    width: 140px;
    white-space: nowrap;
    color: #64748B;
    font-size: 13px;
}

/* Empty State */
.dwr-signing-list-empty {
    background: var(--dwr-white);
    border: 1px solid var(--dwr-border);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 24px;
}

.dwr-signing-list-empty svg {
    margin-bottom: 16px;
}

.dwr-signing-list-empty p {
    font-size: 16px;
    color: #94A3B8;
    margin: 0;
}

/* Pagination */
.dwr-signing-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.dwr-signing-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--dwr-border);
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    background: var(--dwr-white);
    transition: all 0.2s;
}

.dwr-signing-pagination__btn:hover {
    background: #F1F5F9;
    color: var(--dwr-blue-dark);
}

.dwr-signing-pagination__btn--active {
    background: var(--dwr-blue-dark);
    color: var(--dwr-white);
    border-color: var(--dwr-blue-dark);
}

/* Back Link */
.dwr-signing-list-back {
    text-align: center;
    padding: 16px 0;
}

.dwr-signing-list-back a {
    color: var(--dwr-blue);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.dwr-signing-list-back a:hover {
    text-decoration: underline;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    .dwr-custom-header__inner {
        flex-direction: column;
        gap: 12px;
    }
    .dwr-bottom-action-bar__inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .dwr-bottom-action-bar__actions {
        flex-direction: column;
        width: 100%;
    }
    .dwr-intro-hero__title, .dwr-signing-hero__title {
        font-size: 24px;
    }
    .dwr-intro-hero__title::before, .dwr-intro-hero__title::after,
    .dwr-signing-hero__title::before, .dwr-signing-hero__title::after {
        display: none;
    }
    .dwr-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .dwr-form-label {
        text-align: left;
        flex: none;
    }
    .dwr-form-actions {
        flex-direction: column;
    }
    .dwr-form-actions .dwr-btn {
        max-width: 100%;
    }
    /* Signing list responsive */
    .dwr-signing-table-wrap {
        overflow-x: auto;
    }
    .dwr-signing-table {
        min-width: 600px;
    }
    .dwr-signing-list-header {
        padding: 20px;
    }
    .dwr-signing-list-header__title {
        font-size: 22px;
    }
}
