/* ==========================================================================
   Canada Work Visa Applicant Registration & Payment Form Styles
   ========================================================================== */

/* Header Register Button */
.header-register-wrap {
    margin-left: 20px;
    display: inline-flex;
    align-items: center;
}

.btn-header-register {
    display: inline-block;
    padding: 10px 24px;
    background: #cca776;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(204, 167, 118, 0.35);
    transition: all 0.3s ease;
    text-decoration: none !important;
    white-space: nowrap;
}

.btn-header-register:hover {
    background: #17365D;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(23, 54, 93, 0.4);
    transform: translateY(-2px);
}

.fixed-header .btn-header-register {
    padding: 8px 20px;
    font-size: 13px;
}

/* Nav Menu Register Link (Mobile + Fallback) */
#mainnav .menu > li > a.nav-register-btn,
#mainnav-mobi ul > li > a.nav-register-btn {
    color: #cca776 !important;
    font-weight: 700;
}

#mainnav .menu > li > a.nav-register-btn:hover,
#mainnav-mobi ul > li > a.nav-register-btn:hover {
    color: #b38e5e !important;
}

/* Hero Section Register Button */
.btn-hero-register {
    background-color: #cca776 !important;
    color: #ffffff !important;
    margin-right: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    border: 2px solid #cca776;
    cursor: pointer;
}

.btn-hero-register:hover {
    background-color: #17365D !important;
    border-color: #17365D !important;
    color: #ffffff !important;
}

.btn-hero-contact {
    background-color: transparent !important;
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    cursor: pointer;
}

.btn-hero-contact:hover {
    background-color: #ffffff !important;
    color: #291d0d !important;
}

/* Modal Overlay & Container */
.cwv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cwv-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.cwv-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 660px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    margin: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.cwv-modal-overlay.active .cwv-modal-dialog {
    transform: translateY(0);
}

/* Close Button */
button.cwv-modal-close,
.cwv-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: none !important;
    outline: none !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 20 !important;
    box-sizing: border-box !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1 !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

button.cwv-modal-close:hover,
.cwv-modal-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    transform: rotate(90deg) !important;
}

.cwv-modal-close svg {
    pointer-events: none;
    display: block;
}

/* Modal Header Banner */
.cwv-header-banner {
    background: #17365D;
    color: #ffffff;
    padding: 28px 28px 22px 28px;
    position: relative;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.cwv-header-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cwv-flag-icon {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #ffffff;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.cwv-flag-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.cwv-header-text h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #ffffff;
    text-transform: uppercase;
    line-height: 1.2;
}

.cwv-header-text .cwv-sub {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-top: 2px;
}

.cwv-header-text .cwv-desc {
    font-size: 12px;
    color: #E0EAF5;
    margin-top: 1px;
}

.cwv-header-divider {
    height: 1px;
    background: #7890AC;
    margin: 16px 0 14px 0;
    opacity: 0.5;
}

.cwv-header-fee {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.cwv-fee-label {
    font-size: 13px;
    color: #E0EAF5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cwv-fee-amount {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Modal Body (Scrollable) */
.cwv-modal-body {
    padding: 24px 28px 28px 28px;
    overflow-y: auto;
    color: #1e293b;
    font-family: inherit;
    -webkit-overflow-scrolling: touch;
}

.cwv-section {
    margin-bottom: 24px;
}

.cwv-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #17365D;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cwv-section-title i {
    color: #cca776;
}

/* Form Fields */
.cwv-form-group {
    margin-bottom: 14px;
}

.cwv-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.cwv-label span.req {
    color: #dc2626;
    margin-left: 2px;
}

.cwv-input {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 14px;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cwv-input:focus {
    outline: none;
    border-color: #17365D;
    box-shadow: 0 0 0 3px rgba(23, 54, 93, 0.12);
}

.cwv-input::placeholder {
    color: #94a3b8;
}

/* Radio Group */
.cwv-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cwv-radio-card {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    margin-bottom: 0;
}

.cwv-radio-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.cwv-radio-card input[type="radio"] {
    margin-right: 10px;
    accent-color: #17365D;
    width: 17px;
    height: 17px;
    cursor: pointer;
}

.cwv-radio-card.active {
    border-color: #17365D;
    background: #f0f4f9;
}

.cwv-radio-card span {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
}

/* Fee Summary Box */
.cwv-summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.cwv-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 8px;
    color: #475569;
}

.cwv-summary-row:last-child {
    margin-bottom: 0;
}

.cwv-summary-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 10px 0;
}

.cwv-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.cwv-total-amount {
    font-size: 18px;
    font-weight: 800;
    color: #15803d;
}

/* Note box */
.cwv-note-box {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 10px;
}

/* Declaration Checkbox */
.cwv-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    cursor: pointer;
}

.cwv-checkbox-wrap input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #17365D;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.cwv-checkbox-text {
    font-size: 12.5px;
    color: #334155;
    line-height: 1.5;
}

/* Submit Button */
button.cwv-submit-btn,
.cwv-submit-btn {
    width: 100% !important;
    height: 48px !important;
    padding: 0 20px !important;
    background: #17365D !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    margin-top: 18px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(23, 54, 93, 0.25) !important;
    text-transform: none !important;
}

button.cwv-submit-btn:hover:not(:disabled),
.cwv-submit-btn:hover:not(:disabled) {
    background: #0f2541 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(23, 54, 93, 0.35) !important;
}

button.cwv-submit-btn:disabled,
.cwv-submit-btn:disabled {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: 0.7 !important;
}

.cwv-demo-disclaimer {
    font-size: 11px;
    color: #64748b;
    text-align: center;
    margin-top: 10px;
    line-height: 1.4;
}

/* Success / Review State */
.cwv-review-container {
    display: none;
    animation: cwvFadeIn 0.3s ease;
}

@keyframes cwvFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cwv-success-header {
    text-align: center;
    padding: 15px 0 20px 0;
}

.cwv-success-icon {
    width: 56px;
    height: 56px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
}

.cwv-success-title {
    font-size: 20px;
    font-weight: 700;
    color: #17365D;
    margin: 0 0 6px 0;
}

.cwv-success-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.cwv-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.cwv-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 13px;
}

.cwv-summary-item:last-child {
    border-bottom: none;
}

.cwv-summary-label {
    color: #64748b;
    font-weight: 500;
}

.cwv-summary-val {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.cwv-review-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

button.cwv-btn-secondary,
.cwv-btn-secondary {
    flex: 1 !important;
    height: 44px !important;
    padding: 0 15px !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-transform: none !important;
    transition: all 0.2s ease !important;
}

button.cwv-btn-secondary:hover,
.cwv-btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

button.cwv-btn-primary,
.cwv-btn-primary {
    flex: 1 !important;
    height: 44px !important;
    padding: 0 15px !important;
    background: #17365D !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-transform: none !important;
    transition: all 0.2s ease !important;
}

button.cwv-btn-primary:hover,
.cwv-btn-primary:hover {
    background: #0f2541 !important;
    color: #ffffff !important;
}

/* Responsive tweaks */
@media (max-width: 991px) {
    .header-register-wrap {
        display: none;
    }
}

@media (max-width: 600px) {
    .cwv-modal-overlay {
        padding: 10px;
    }
    .cwv-header-banner {
        padding: 20px 18px 16px 18px;
    }
    .cwv-header-text h3 {
        font-size: 18px;
    }
    .cwv-fee-amount {
        font-size: 20px;
    }
    .cwv-modal-body {
        padding: 18px 16px 20px 16px;
    }
    .cwv-flag-icon {
        width: 46px;
        height: 46px;
    }
    .btn-hero-register {
        margin-right: 0;
        margin-bottom: 10px;
    }
}
