/*
|--------------------------------------------------------------------------
| QR Code Module - Glass Style
|--------------------------------------------------------------------------
|
| 線上收款系統 QRCode 產製功能共用樣式
|
*/


/*
|--------------------------------------------------------------------------
| 1. General Background
|--------------------------------------------------------------------------
*/

body.qrcode-page {
    margin: 0;

    min-height: 100vh;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.45),
            rgba(255, 255, 255, 0.45)
        ),
        url('../images/bg03.jpg');

    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;

    color: #1f2937;

    font-family:
        "Microsoft JhengHei",
        "Segoe UI",
        "PingFang TC",
        sans-serif;
}


/*
|--------------------------------------------------------------------------
| 2. Page Wrapper
|--------------------------------------------------------------------------
*/

.qrcode-page-wrapper {
    box-sizing: border-box;

    min-height: 100vh;

    padding: 32px 18px;
}


/*
|--------------------------------------------------------------------------
| 3. Glass Container
|--------------------------------------------------------------------------
*/

.qrcode-container {
    box-sizing: border-box;

    width: min(860px, 100%);

    margin: 0 auto;
    padding: 30px 34px;

    background:
        rgba(255, 255, 255, 0.58);

    border:
        1px solid
        rgba(255, 255, 255, 0.58);

    border-radius: 18px;

    box-shadow:
        0 18px 42px
        rgba(15, 23, 42, 0.14),

        0 4px 12px
        rgba(15, 23, 42, 0.06),

        inset 0 1px 0
        rgba(255, 255, 255, 0.62);

    backdrop-filter:
        blur(18px)
        saturate(155%);

    -webkit-backdrop-filter:
        blur(18px)
        saturate(155%);
}


/*
|--------------------------------------------------------------------------
| 4. Header
|--------------------------------------------------------------------------
*/

.qrcode-header {
    margin-bottom: 26px;

    text-align: center;
}

.qrcode-title-school {
    margin-bottom: 7px;

    font-family:
        "DFKai-SB",
        "標楷體",
        "BiauKai",
        serif;

    font-size: 1.5rem;

    line-height: 1.5;

    letter-spacing: 0.12em;
}

.qrcode-title {
    margin: 0;

    font-family:
        "DFKai-SB",
        "標楷體",
        "BiauKai",
        serif;

    font-size: 1.8rem;

    font-weight: normal;

    line-height: 1.45;
}


/*
|--------------------------------------------------------------------------
| 5. Alerts
|--------------------------------------------------------------------------
*/

.qrcode-alert {
    box-sizing: border-box;

    margin-bottom: 20px;

    padding: 12px 16px;

    border: 1px solid;

    border-radius: 10px;

    line-height: 1.6;

    box-shadow:
        0 5px 14px
        rgba(15, 23, 42, 0.05);
}

.qrcode-alert ul {
    margin: 8px 0 0;

    padding-left: 24px;
}

.qrcode-alert-error {
    background:
        rgba(255, 244, 244, 0.94);

    border-color:
        rgba(187, 119, 119, 0.70);

    color: #7f1d1d;
}

.qrcode-alert-success {
    background:
        rgba(242, 255, 243, 0.94);

    border-color:
        rgba(122, 161, 124, 0.70);

    color: #315b33;
}


/*
|--------------------------------------------------------------------------
| 6. Content Section
|--------------------------------------------------------------------------
*/

.qrcode-content-section {
    margin-bottom: 26px;
}

.qrcode-content-section:last-child {
    margin-bottom: 0;
}

.qrcode-section-title {
    margin: 0 0 15px;

    padding-bottom: 8px;

    border-bottom:
        1px solid
        rgba(130, 140, 150, 0.42);

    font-size: 1.25rem;

    line-height: 1.5;
}


/*
|--------------------------------------------------------------------------
| 7. Form Table
|--------------------------------------------------------------------------
*/

.qrcode-table {
    width: 100%;

    border-collapse: collapse;

    background:
        rgba(255, 255, 255, 0.60);

    border-radius: 12px;

    overflow: hidden;
}

.qrcode-table th,
.qrcode-table td {
    padding: 14px 16px;

    border:
        1px solid
        rgba(130, 140, 150, 0.32);

    vertical-align: middle;
}

.qrcode-table th {
    width: 230px;

    background:
        rgba(255, 255, 255, 0.44);

    text-align: left;

    font-weight: 700;

    line-height: 1.55;
}

.qrcode-table th small {
    font-size: 0.86rem;

    font-weight: normal;

    color: #6b7280;
}


/*
|--------------------------------------------------------------------------
| 8. Select
|--------------------------------------------------------------------------
*/

.qrcode-select {
    box-sizing: border-box;

    width: 100%;

    min-height: 44px;

    padding: 9px 38px 9px 12px;

    background:
        rgba(255, 255, 255, 0.92);

    border:
        1px solid
        rgba(110, 120, 130, 0.50);

    border-radius: 8px;

    color: #1f2937;

    font-family: inherit;
    font-size: 1rem;

    line-height: 1.4;

    outline: none;
}

.qrcode-select:focus {
    border-color:
        rgba(76, 112, 160, 0.72);

    box-shadow:
        0 0 0 3px
        rgba(76, 112, 160, 0.12);
}

.qrcode-select:disabled {
    background:
        rgba(240, 242, 245, 0.82);

    color: #8a929d;

    cursor: not-allowed;
}


/*
|--------------------------------------------------------------------------
| 9. Input
|--------------------------------------------------------------------------
*/

.qrcode-input {
    box-sizing: border-box;

    width: 100%;

    min-height: 44px;

    padding: 10px 12px;

    background:
        rgba(255, 255, 255, 0.92);

    border:
        1px solid
        rgba(110, 120, 130, 0.50);

    border-radius: 8px;

    color: #1f2937;

    font-family: inherit;
    font-size: 1rem;

    outline: none;
}

.qrcode-input:focus {
    border-color:
        rgba(76, 112, 160, 0.72);

    box-shadow:
        0 0 0 3px
        rgba(76, 112, 160, 0.12);
}

.qrcode-input::placeholder {
    color: #9ca3af;
}


/*
|--------------------------------------------------------------------------
| 10. Amount Field
|--------------------------------------------------------------------------
*/

.qrcode-amount-wrapper {
    display: flex;

    align-items: center;

    gap: 8px;
}

.qrcode-amount-prefix {
    flex: 0 0 auto;

    font-weight: 700;

    color: #4b5563;
}

.qrcode-amount-wrapper .qrcode-input {
    flex: 1 1 auto;
}


/*
|--------------------------------------------------------------------------
| 11. Field Message / Hint
|--------------------------------------------------------------------------
*/

.qrcode-field-message {
    min-height: 1.4em;

    margin-top: 7px;

    color: #8a5a14;

    font-size: 0.9rem;

    line-height: 1.45;
}

.qrcode-field-hint {
    margin-top: 7px;

    color: #6b7280;

    font-size: 0.9rem;

    line-height: 1.55;
}


/*
|--------------------------------------------------------------------------
| 12. Buttons
|--------------------------------------------------------------------------
*/

.qrcode-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 18px;
}

.qrcode-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    width: 180px;
    min-height: 44px;

    padding: 9px 14px;

    border:
        1px solid
        transparent;

    border-radius: 9px;

    font-family: inherit;
    font-size: 1rem;

    line-height: 1.4;

    cursor: pointer;

    text-decoration: none;

    white-space: nowrap;

    appearance: none;
    -webkit-appearance: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.08s ease;
}

.qrcode-button:hover {
    text-decoration: none;
}

.qrcode-button:active {
    transform:
        translateY(1px);
}

.qrcode-button:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px
        rgba(76, 112, 160, 0.18);
}

.qrcode-button-primary {
    background:
        rgba(56, 96, 150, 0.90);

    color: #fff;

    border-color:
        rgba(47, 79, 120, 0.70);
}

.qrcode-button-primary:hover {
    background:
        rgba(47, 84, 133, 0.95);

    color: #fff;
}

.qrcode-button-secondary {
    background:
        rgba(255, 255, 255, 0.68);

    color: #374151;

    border-color:
        rgba(130, 140, 150, 0.42);
}

.qrcode-button-secondary:hover {
    background:
        rgba(255, 255, 255, 0.88);

    color: #1f2937;
}

.qrcode-button:disabled {
    opacity: 0.62;

    cursor: not-allowed;

    transform: none;
}


/*
|--------------------------------------------------------------------------
| 13. Notice
|--------------------------------------------------------------------------
*/

.qrcode-notice {
    padding: 15px 18px;

    background:
        rgba(255, 255, 255, 0.48);

    border:
        1px solid
        rgba(255, 255, 255, 0.52);

    border-radius: 12px;

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, 0.52);

    line-height: 1.7;
}

.qrcode-notice ol {
    margin: 0;

    padding-left: 24px;
}

.qrcode-notice li {
    margin-bottom: 6px;
}

.qrcode-notice li:last-child {
    margin-bottom: 0;
}


/*
|--------------------------------------------------------------------------
| 14. QR Code Result Page
|--------------------------------------------------------------------------
|
| result.blade.php 之後可直接沿用這些樣式。
|
*/

.qrcode-result-grid {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap: 18px;

    margin-top: 18px;
}

.qrcode-result-card {
    box-sizing: border-box;

    padding: 18px;

    background:
        rgba(255, 255, 255, 0.64);

    border:
        1px solid
        rgba(130, 140, 150, 0.30);

    border-radius: 14px;

    text-align: center;

    box-shadow:
        0 6px 18px
        rgba(15, 23, 42, 0.06);
}

.qrcode-result-image-wrapper {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 240px;

    margin-bottom: 14px;
}

.qrcode-result-image {
    display: block;

    width: 220px;
    max-width: 100%;

    height: auto;

    margin: 0 auto;
}

.qrcode-result-title {
    margin: 0 0 8px;

    font-size: 1.05rem;

    font-weight: 700;

    line-height: 1.5;
}

.qrcode-result-description {
    margin: 0;

    color: #4b5563;

    font-size: 0.94rem;

    line-height: 1.6;
}

.qrcode-result-amount {
    margin-top: 6px;

    color: #8b3e1f;

    font-size: 1.05rem;

    font-weight: 700;
}


/*
|--------------------------------------------------------------------------
| 15. Result Information Table
|--------------------------------------------------------------------------
*/

.qrcode-result-table {
    width: 100%;

    border-collapse: collapse;

    margin-top: 18px;

    background:
        rgba(255, 255, 255, 0.60);

    border-radius: 12px;

    overflow: hidden;
}

.qrcode-result-table th,
.qrcode-result-table td {
    padding: 12px 15px;

    border:
        1px solid
        rgba(130, 140, 150, 0.30);

    vertical-align: middle;
}

.qrcode-result-table th {
    width: 210px;

    background:
        rgba(255, 255, 255, 0.44);

    text-align: left;

    font-weight: 700;
}


/*
|--------------------------------------------------------------------------
| 16. URL Display
|--------------------------------------------------------------------------
*/

.qrcode-url {
    overflow-wrap: anywhere;

    word-break: break-word;

    color: #475569;

    font-size: 0.88rem;

    line-height: 1.5;
}


/*
|--------------------------------------------------------------------------
| 17. Loading State
|--------------------------------------------------------------------------
*/

.qrcode-loading {
    opacity: 0.68;

    pointer-events: none;
}

.qrcode-loading-text {
    color: #6b7280;

    font-size: 0.92rem;
}


/*
|--------------------------------------------------------------------------
| 18. Responsive - Tablet
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .qrcode-result-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/*
|--------------------------------------------------------------------------
| 19. Responsive - Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 700px) {

    .qrcode-page-wrapper {
        padding:
            18px 12px;
    }

    .qrcode-container {
        padding:
            24px 18px;
    }

    .qrcode-title-school {
        font-size:
            1.3rem;
    }

    .qrcode-title {
        font-size:
            1.55rem;
    }


    /*
    |--------------------------------------------------------------------------
    | Form Table
    |--------------------------------------------------------------------------
    */

    .qrcode-table,
    .qrcode-table tbody,
    .qrcode-table tr,
    .qrcode-table th,
    .qrcode-table td {
        display: block;

        width: 100%;
    }

    .qrcode-table th {
        box-sizing: border-box;

        border-bottom: 0;
    }


    /*
    |--------------------------------------------------------------------------
    | Result Table
    |--------------------------------------------------------------------------
    */

    .qrcode-result-table,
    .qrcode-result-table tbody,
    .qrcode-result-table tr,
    .qrcode-result-table th,
    .qrcode-result-table td {
        display: block;

        width: 100%;
    }

    .qrcode-result-table th {
        box-sizing: border-box;

        border-bottom: 0;
    }


    /*
    |--------------------------------------------------------------------------
    | Actions
    |--------------------------------------------------------------------------
    */

    .qrcode-actions {
        flex-direction: column;
    }

    .qrcode-button {
        width: 100%;
    }


    /*
    |--------------------------------------------------------------------------
    | QR Code Result
    |--------------------------------------------------------------------------
    */

    .qrcode-result-grid {
        grid-template-columns:
            1fr;
    }

    .qrcode-result-image-wrapper {
        min-height: auto;
    }

}


/*
|--------------------------------------------------------------------------
| 20. Very Small Screen
|--------------------------------------------------------------------------
*/

@media (max-width: 420px) {

    .qrcode-container {
        padding:
            20px 14px;
    }

    .qrcode-table th,
    .qrcode-table td {
        padding:
            12px;
    }

    .qrcode-result-card {
        padding:
            15px;
    }

    .qrcode-amount-wrapper {
        align-items:
            stretch;

        flex-direction:
            column;

        gap:
            5px;
    }

}