/**
 * Trang mở tài khoản (/open-account).
 * File tĩnh, không đi qua bundle windi/vite nên chỉnh sửa không cần build lại assets.
 * Mọi class đều có tiền tố .oa- để không đụng với CSS toàn site.
 */

.oa-page {
    --oa-primary: #24723b;
    --oa-primary-mid: #5e9a56;
    --oa-primary-dark: #1d5e30;
    --oa-gold: #b8912e;
    --oa-muted: #6b7280;
    --oa-radius: 10px;

    position: relative;
    padding: 32px 0 56px;
    background: linear-gradient(180deg, #f2f6ec 0%, #e4edda 55%, #d8e5cc 100%);
}

.oa-page--has-bg {
    background: none;
}

.oa-page__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.oa-page__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oa-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

.oa-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 44px 48px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(36, 114, 59, 0.1);
}

/* ---------- Cột trái: tải ứng dụng ---------- */

.oa-download {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.oa-timer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border: 3px solid var(--oa-primary);
    border-radius: 50%;
}

/* Có artwork từ Directus thì ảnh thay luôn vòng tròn vẽ bằng CSS */
.oa-timer--image {
    border: 0;
}

/* Ảnh là trọn bộ badge (đã in sẵn chữ): giữ tỉ lệ gốc, bỏ khung vuông 78x78 */
.oa-timer--full {
    width: 100px;
    height: auto;
    border-radius: 0;
}

.oa-timer--full .oa-timer__art {
    position: static;
    width: 100%;
    height: auto;
}

.oa-timer__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.oa-timer__label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.oa-timer__num {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--oa-primary);
}

.oa-timer__unit {
    font-size: 12px;
    font-weight: 600;
    color: var(--oa-primary);
}

.oa-download__kicker {
    margin: 12px 0 0;
    font-size: 20px;
    color: #374151;
}

.oa-app-title {
    margin: 2px 0 0;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.5px;
    color: var(--oa-primary);
}

.oa-download__sub {
    margin: 6px 0 0;
    font-size: 17px;
    color: var(--oa-muted);
}

.oa-rule {
    width: 100%;
    max-width: 420px;
    height: 1px;
    margin: 16px 0 18px;
    border: 0;
    background: #e5e7eb;
}

.oa-download__row {
    display: flex;
    gap: 22px;
    width: 100%;
    max-width: 440px;
    text-align: left;
}

.oa-qr {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    width: 168px;
    padding: 10px 10px 0;
    background: var(--oa-primary);
    border-radius: 14px;
}

.oa-qr__frame {
    width: 148px;
    height: 148px;
    overflow: hidden;
    background: #fff;
    border-radius: var(--oa-radius);
}

.oa-qr__frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.oa-qr__label {
    padding: 10px 0 12px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.oa-meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.oa-features {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.oa-feature {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #374151;
}

.oa-feature svg {
    flex-shrink: 0;
    color: var(--oa-primary);
}

.oa-app-ident {
    display: flex;
    align-items: center;
    gap: 10px;
}

.oa-app-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--oa-primary), var(--oa-primary-mid));
    border-radius: var(--oa-radius);
}

.oa-app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oa-app-ident__name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--oa-primary);
}

.oa-app-ident__tagline {
    margin: 2px 0 0;
    font-size: 12px;
    font-style: italic;
    line-height: 1.35;
    color: var(--oa-muted);
}

.oa-stores {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.oa-store {
    display: block;
    line-height: 0;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.oa-store:hover {
    opacity: 0.85;
}

.oa-store img {
    height: 40px;
    width: auto;
}

/* ---------- Cột phải: video hướng dẫn + ưu đãi ---------- */

.oa-tutorial {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.oa-tutorial__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #1f2937;
}

.oa-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e7ebe3;
    border-radius: var(--oa-radius);
}

.oa-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.oa-video__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--oa-primary);
    background: linear-gradient(135deg, #1a6b3c 0%, #2d8a4e 50%, #1a6b3c 100%);
}

.oa-video__placeholder span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.oa-promo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: #fff;
    background: var(--oa-primary);
    border-radius: var(--oa-radius);
    transition: background 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.oa-promo:hover {
    color: #fff;
    background: var(--oa-primary-dark);
}

.oa-promo__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--oa-primary);
    background: #fff;
    border-radius: 50%;
}

.oa-promo__text {
    flex: 1;
    font-size: 15px;
    line-height: 1.45;
}

.oa-promo__chevron {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
    .oa-card {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px 24px;
    }
}

@media (max-width: 639px) {
    .oa-page {
        padding: 20px 0 36px;
    }

    .oa-card {
        gap: 28px;
        padding: 24px 16px;
    }

    .oa-app-title {
        font-size: 28px;
    }

    .oa-download__kicker {
        font-size: 17px;
    }

    .oa-download__sub {
        font-size: 15px;
    }

    .oa-download__row {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .oa-meta {
        width: 100%;
    }

    .oa-features {
        justify-content: center;
    }

    .oa-app-ident,
    .oa-stores {
        justify-content: center;
    }

    .oa-app-ident__text {
        text-align: left;
    }
}
