/* Auspicious Light Entry Form Styles */

/* ========================================
   Form Container
   ======================================== */
.auspicious-light-container {
    max-width: 900px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.form-header {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255, 0, 255, 0.3);
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
    text-align: center;
    color: #fff;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.form-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.form-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-header p {
    margin: 10px 0 0 0;
    opacity: 0.95;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.form-body {
    padding: 40px;
}


.form-section {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    font-size: 22px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    margin-left: 10px;
}


.form-group {
    margin-bottom: 24px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-label.required::after {
    content: '*';
    color: #e74c3c;
    margin-left: 3px;
}

.bilingual-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.label-chinese {
    font-size: 15px;
}

.label-english {
    font-size: 13px;
    color: #7f8c8d;
}

.form-control,
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

/* This stylesheet is loaded globally (index.html), not scoped to the
   auspicious-light feature, so its flat padding above reaches every
   .form-select on every page — including DataTables' length dropdown —
   and re-clobbers the right padding Bootstrap reserves for its chevron
   background-image. Restore it here, same as app.css. */
.form-select {
    padding-right: 2.25rem;
}

.form-select-sm {
    padding-right: 2rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
    background-color: white;
    transform: translateY(-2px);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--primary-color);
    background-color: white;
}


.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.option-card {
    flex: 1;
    min-width: 150px;
    position: relative;
}

.option-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    text-align: center;
    min-height: 80px;
}

.option-label:hover {
    border-color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.05);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.option-input:checked+.option-label {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), rgba(var(--secondary-rgb), 0.1));
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.2);
    transform: scale(1.02);
}

.option-input:checked+.option-label::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    animation: checkmark-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmark-pop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.option-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.option-subtitle {
    font-size: 12px;
    color: #7f8c8d;
}


.date-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--secondary-rgb), 0.08));
    border: 2px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 10px;
}

.date-display i {
    font-size: 20px;
    color: var(--primary-color);
}

.date-display-text {
    flex: 1;
}

.date-display-label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 2px;
}

.date-display-value {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}


.auto-field {
    position: relative;
}

.auto-badge {
    position: absolute;
    top: -8px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 10;
}


.submit-section {
    margin-top: 40px;
    text-align: center;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 14px 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(var(--primary-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit i {
    margin-right: 8px;
}

.btn-cancel {
    background: #f0f0f0;
    color: #666;
    border: 2px solid #ddd;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
}

.btn-cancel:hover {
    background: #e0e0e0;
    border-color: #ccc;
    transform: translateY(-2px);
}


.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #27ae60;
    background-color: #f0fff4;
}

/* Colour/size only — NO `display`. This file is loaded globally from index.html,
   so forcing display:block here overrode Bootstrap's hidden-by-default and made
   every .invalid-feedback in the app permanently visible (e.g. the "Please enter a
   valid ID number" message on the member form). Bootstrap already reveals these
   via `.is-invalid ~ .invalid-feedback` / `.was-validated :invalid ~ …`. */
.invalid-feedback {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    animation: shake 0.3s ease;
}

.valid-feedback {
    color: #27ae60;
    font-size: 13px;
    margin-top: 6px;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}


.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #27ae60;
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.success-checkmark .check-icon::before,
.success-checkmark .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: white;
    transform: rotate(-45deg);
}

.success-checkmark .icon-line {
    height: 5px;
    background-color: #27ae60;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }

    5% {
        transform: rotate(-45deg);
    }

    12% {
        transform: rotate(-405deg);
    }

    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }

    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }

    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    84% {
        width: 55px;
        right: 0;
        top: 35px;
    }

    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}


@media (max-width: 768px) {
    .form-body {
        padding: 25px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .option-card {
        min-width: 100%;
    }

    .option-group {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        margin-bottom: 10px;
    }
}


@media print {

    .btn-submit,
    .btn-cancel {
        display: none;
    }

    .form-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.form-check-card {
    position: relative;
    padding: 0;
    margin: 0 15px;
    height: 100%;
}

.form-check-card .form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.form-check-card .form-check-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-height: 120px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.form-check-card .form-check-label i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #6c757d;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-check-card .form-check-label span {
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
}

/* Hover State with Animation */
.form-check-card:hover .form-check-label {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255, 0, 255, 0.15);
    transform: translateY(-4px) scale(1.02);
}

.form-check-card:hover .form-check-label i {
    color: var(--primary-color);
    transform: scale(1.15) rotate(5deg);
}

/* Checked State with Gradient Background */
.form-check-card .form-check-input:checked~.form-check-label {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.08) 0%, rgba(128, 128, 0, 0.08) 100%);
    box-shadow: 0 8px 25px rgba(255, 0, 255, 0.25);
    transform: scale(1.05);
}

.form-check-card .form-check-input:checked~.form-check-label i {
    color: var(--primary-color);
    transform: scale(1.2);
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1.3);
    }
}

/* transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
} */

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }

    5% {
        transform: rotate(-45deg);
    }

    12% {
        transform: rotate(-405deg);
    }

    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }

    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }

    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    84% {
        width: 55px;
        right: 0;
        top: 35px;
    }

    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}


@media (max-width: 768px) {
    .form-body {
        padding: 25px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .option-card {
        min-width: 100%;
    }

    .option-group {
        flex-direction: column;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        margin-bottom: 10px;
    }
}


@media print {

    .btn-submit,
    .btn-cancel {
        display: none;
    }

    .form-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.form-check-card {
    position: relative;
    padding: 0;
    margin: 0 15px;
    height: 100%;
}

.form-check-card .form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.form-check-card .form-check-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-height: 120px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.form-check-card .form-check-label i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #6c757d;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-check-card .form-check-label span {
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
}

/* Hover State with Animation */
.form-check-card:hover .form-check-label {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(255, 0, 255, 0.15);
    transform: translateY(-4px) scale(1.02);
}

.form-check-card:hover .form-check-label i {
    color: var(--primary-color);
    transform: scale(1.15) rotate(5deg);
}

/* Checked State with Gradient Background */
.form-check-card .form-check-input:checked~.form-check-label {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 0, 255, 0.08) 0%, rgba(128, 128, 0, 0.08) 100%);
    box-shadow: 0 8px 25px rgba(255, 0, 255, 0.25);
    transform: scale(1.05);
}

.form-check-card .form-check-input:checked~.form-check-label i {
    color: var(--primary-color);
    transform: scale(1.2);
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1.2);
    }

    50% {
        transform: scale(1.3);
    }
}

.form-check-card .form-check-input:checked~.form-check-label span {
    color: var(--primary-color);
    font-weight: 600;
}

/* Focus State */
.form-check-card .form-check-input:focus~.form-check-label {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   AL Header Styles (Match Donations)
   ======================================== */
.al-header {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 0;
    margin-bottom: 30px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255, 0, 255, 0.3);
    animation: gradientShift 8s ease infinite;
    background-size: 200% 200%;
}

.al-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0.1) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.1) 75%,
            transparent 75%,
            transparent);
    background-size: 50px 50px;
    opacity: 0.3;
    animation: movePattern 20s linear infinite;
}

.al-header .container-fluid {
    position: relative;
    z-index: 1;
}

.al-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.al-header-icon {
    font-size: 48px;
    color: #ffd700;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: iconPulse 2s ease-in-out infinite;
}

.al-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.al-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    margin: 5px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}