/**
 * Gift Vouchers Section Styles
 * Uses CSS variables from assets/variables.css
 */

/* Section container - light theme by default */
#darkove-poukazy {
    background-color: var(--color-secondary, #e4decb);
    color: var(--color-primary, #3e5340);
}

/* Dark theme variant */
#darkove-poukazy.dark {
    background-color: var(--color-primary, #3e5340);
    color: var(--color-secondary, #e4decb);
}

/* Two-column layout */
.gift-vouchers-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .gift-vouchers-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .gift-vouchers-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Left column - marketing text */
.gv-info {
    padding-right: 2rem;
}

@media (max-width: 992px) {
    .gv-info {
        padding-right: 0;
    }
}

.gv-info h2 {
    font-family: var(--heading-font-family, 'Merriweather', Georgia, serif);
    font-size: var(--h2-size, 32px);
    font-weight: var(--heading-font-weight, 700);
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .gv-info h2 {
        font-size: 24px;
    }
}

.gv-info p {
    margin-bottom: 1rem;
    line-height: var(--line-height, 1.6);
}

.gv-info ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.gv-info li {
    margin-bottom: 0.5rem;
}

/* Right column - order panel */
.gv-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 576px) {
    .gv-panel {
        padding: 1.5rem;
        border-radius: 8px;
    }
}

#darkove-poukazy.dark .gv-panel {
    background: rgba(0, 0, 0, 0.1);
}

/* Form elements */
.gv-panel label {
    display: block;
    font-family: var(--heading-font-family, 'Merriweather', Georgia, serif);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.gv-panel select,
.gv-panel input[type="number"],
.gv-panel input[type="text"],
.gv-panel input[type="email"],
.gv-panel textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid currentColor;
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-family, 'Open Sans', Arial, sans-serif);
    background: transparent;
    color: inherit;
    margin-bottom: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gv-panel select:focus,
.gv-panel input:focus,
.gv-panel textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(62, 83, 64, 0.2);
}

#darkove-poukazy.dark .gv-panel select:focus,
#darkove-poukazy.dark .gv-panel input:focus,
#darkove-poukazy.dark .gv-panel textarea:focus {
    box-shadow: 0 0 0 3px rgba(228, 222, 203, 0.2);
}

.gv-panel select option {
    background: var(--color-secondary, #e4decb);
    color: var(--color-primary, #3e5340);
}

/* Price summary */
.gv-price-summary {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.5rem 0;
    text-align: center;
}

@media (max-width: 576px) {
    .gv-price-summary {
        padding: 0.875rem;
        margin: 1.25rem 0;
    }
}

#darkove-poukazy.dark .gv-price-summary {
    background: rgba(0, 0, 0, 0.15);
}

.gv-price-summary .price-calculation {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 576px) {
    .gv-price-summary .price-calculation {
        font-size: 1rem;
    }
}

.gv-price-summary .total-price {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--heading-font-family, 'Merriweather', Georgia, serif);
}

@media (max-width: 576px) {
    .gv-price-summary .total-price {
        font-size: 1.35rem;
    }
}


.gv-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 2rem;
    height: 52px;
    font-size: 1.1rem;
    font-family: var(--heading-font-family, 'Merriweather', Georgia, serif);
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--color-primary, #3e5340);
    color: var(--color-secondary, #e4decb);
}

@media (max-width: 576px) {
    .gv-cta-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

#darkove-poukazy.dark .gv-cta-btn {
    background: var(--color-secondary, #e4decb);
    color: var(--color-primary, #3e5340);
}

@media (hover: hover) {
    .gv-cta-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

@media (hover: hover) and (max-width: 576px) {
    .gv-cta-btn:hover:not(:disabled) {
        transform: translateY(-1px);
    }
}

.gv-cta-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gv-cta-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* Order result section */
.gv-order-result {
    margin-top: 2rem;
}

.gv-order-result.hidden {
    display: none;
}

/* Status steps */
.gv-status-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.gv-status-steps::before {
    content: '';
    position: absolute;
    top: calc(24px / 2); /* Half of dot size for vertical centering */
    left: 5%;
    right: 5%;
    height: 2px;
    background: currentColor;
    opacity: 0.3;
    z-index: 0;
}

@media (max-width: 576px) {
    .gv-status-steps::before {
        left: 10%;
        right: 10%;
    }
}

.gv-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    background: inherit;
    padding: 0 0.5rem;
    flex: 1;
}

.gv-step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: var(--color-secondary, #e4decb);
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

#darkove-poukazy.dark .gv-step-dot {
    background: var(--color-primary, #3e5340);
}

.gv-step.active .gv-step-dot {
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
}

.gv-step.completed .gv-step-dot {
    background: currentColor;
}

.gv-step-label {
    font-size: 0.75rem;
    text-align: center;
    white-space: normal;
    max-width: 100px;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .gv-step-label {
        font-size: 0.65rem;
        max-width: 80px;
    }
    
    .gv-step-dot {
        width: 20px;
        height: 20px;
    }
}

/* QR Code section */
.gv-qr-section {
    text-align: center;
    margin: 2rem 0;
}

.gv-qr-section p {
    margin-bottom: 1rem;
}

.gv-qr-section img {
    max-width: 250px;
    width: 100%;
    height: auto;
    border: 4px solid currentColor;
    border-radius: 8px;
    background: white;
    padding: 8px;
    display: inline-block;
}

@media (max-width: 576px) {
    .gv-qr-section img {
        max-width: 200px;
        border-width: 3px;
        padding: 6px;
    }
}

/* Payment instructions */
.gv-payment-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

@media (max-width: 576px) {
    .gv-payment-info {
        padding: 0.875rem;
        font-size: 0.85rem;
    }
}

#darkove-poukazy.dark .gv-payment-info {
    background: rgba(0, 0, 0, 0.1);
}

.gv-payment-info p {
    margin-bottom: 0.75rem;
}

.gv-payment-info dt {
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

.gv-payment-info dd {
    display: inline;
    margin-left: 0.5rem;
    font-family: monospace;
    word-break: break-all;
}

@media (max-width: 576px) {
    .gv-payment-info dt {
        display: block;
        min-width: auto;
    }
}
/* Email-send UI under voucher download */
.gv-email-section {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.gv-email-section label {
    flex: 0 0 100%;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.gv-email-input {
    flex: 1 1 220px;
    padding: 0.6rem 0.8rem;
    border: 2px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    font-size: 0.95rem;
}

.gv-send-email-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    background: var(--color-primary, #3e5340);
    color: var(--color-secondary, #e4decb);
    border: none;
    border-radius: 8px;
    padding: 0 1rem;
    height: 44px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    text-decoration: none;
    min-width: 160px;
}

.gv-send-email-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Enhanced button styling */

.gv-send-email-btn {
    box-shadow: 0 6px 18px rgba(62,83,64,0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.gv-send-email-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(62,83,64,0.16);
}

.gv-send-email-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.gv-send-email-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.gv-email-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(62,83,64,0.12);
    border-color: rgba(62,83,64,0.2);
}

.gv-email-success {
    flex: 1 1 100%;
    background: #e6f5ea;
    border: 1px solid #cfead7;
    color: #1f6f3a;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}
    
    .gv-payment-info dd {
        display: block;
        margin-left: 0;
        margin-top: 0.25rem;
    }
}

.gv-payment-info dl {
    margin: 0.5rem 0;
}

/* Voucher list */
.gv-voucher-list {
    margin-top: 1.5rem;
}

.gv-voucher-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .gv-voucher-item {
        padding: 0.625rem;
        gap: 0.75rem;
    }
}

#darkove-poukazy.dark .gv-voucher-item {
    background: rgba(0, 0, 0, 0.1);
}

.gv-voucher-code {
    font-family: monospace;
    font-size: 0.9rem;
    flex: 1;
    min-width: 150px;
    word-break: break-all;
}

@media (max-width: 576px) {
    .gv-voucher-code {
        font-size: 0.8rem;
        min-width: 120px;
    }
}

.gv-download-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .gv-download-btn {
        padding: 0.4rem 0.875rem;
        font-size: 0.8rem;
    }
}

@media (hover: hover) {
    .gv-download-btn:hover {
        background: currentColor;
        color: var(--color-secondary, #e4decb);
    }

    #darkove-poukazy.dark .gv-download-btn:hover {
        color: var(--color-primary, #3e5340);
    }
}

/* Error/Success messages */
.gv-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
}

.gv-message.error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
}

.gv-message.success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.5);
}

.gv-message.hidden {
    display: none;
}

/* Optional fields toggle */
.gv-optional-fields {
    margin-top: 1rem;
}

.gv-optional-toggle {
    font-size: 0.9rem;
    opacity: 0.8;
    cursor: pointer;
    display: inline-block;
    margin-bottom: 1rem;
}

.gv-optional-toggle:hover {
    opacity: 1;
}

.gv-optional-content {
    display: none;
}

.gv-optional-content.visible {
    display: block;
}

/* Loading spinner */
.gv-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: gv-spin 0.8s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

@keyframes gv-spin {
    to { transform: rotate(360deg); }
}

/* Form row for name/email */
.gv-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .gv-form-row {
        grid-template-columns: 1fr;
    }
}

/* Small note text */
.gv-note {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Voucher result wrapper */
.gv-vouchers-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

/* 3D stack effect for multiple vouchers */
.gv-vouchers-wrapper.has-multiple {

}

.gv-voucher-wrapper {
    position: relative;
}

.gv-voucher-wrapper:last-child {
    border-bottom: none;
}

.gv-voucher-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.gv-voucher-preview {
    text-align: center;
    position: relative;
}

/* Main voucher image */
.gv-voucher-preview img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    position: relative;
    z-index: 3;
}

/* Stack layers behind the main voucher */
.gv-voucher-preview::before,
.gv-voucher-preview::after {
    content: '';
    position: absolute;
    width: 96%;
    height: 95%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
}

/* Hide stack effect for single voucher */
.gv-vouchers-wrapper:not(.has-multiple) .gv-voucher-preview::before,
.gv-vouchers-wrapper:not(.has-multiple) .gv-voucher-preview::after {
    display: none;
}

/* Second layer */
.gv-voucher-preview::before {
    z-index: 2;
    top: 8px;
}

/* Third layer */
.gv-voucher-preview::after {
    z-index: 1;
    top: 16px;
    width: 92%;
    height: 90%;
}

.gv-download-section {
    text-align: center;
    margin: 2rem 0;
}

.gv-download-all-btn,
.gv-download-single-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--color-primary, #3e5340);
    color: var(--color-secondary, #e4decb);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

#darkove-poukazy.dark .gv-download-all-btn,
#darkove-poukazy.dark .gv-download-single-btn {
    background: var(--color-secondary, #e4decb);
    color: var(--color-primary, #3e5340);
}

@media (hover: hover) {
    .gv-download-all-btn:hover,
    .gv-download-single-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
}

.gv-payment-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

#darkove-poukazy.dark .gv-payment-box {
    background: rgba(0, 0, 0, 0.1);
}

.gv-payment-box p {
    margin-bottom: 1rem;
}

.gv-payment-grid {
    display: grid;
    gap: 0.5rem;
}

.gv-payment-row {
    display: flex;
    justify-content: space-between;
}

.gv-qr-box {
    margin-top: 1.5rem;
    text-align: center;
}

.gv-qr-box p {
    margin-bottom: 0.75rem;
}

.gv-qr-box img {

    margin: 0 auto;
}

/* Stronger specificity to ensure send-email button styles apply */
.gv-email-section .gv-send-email-btn {
    background: var(--color-primary, #3e5340) !important;
    color: var(--color-secondary, #e4decb) !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(62,83,64,0.12) !important;
}

@media (max-width: 576px) {
    .gv-email-section .gv-send-email-btn {
        width: 100%;
        min-width: 0;
    }
}
