@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');


:root {
    --border: #e8f4fd;
    --shadow: 0 4px 12px rgba(30, 120, 223, 0.15);
    --shadow-hover: 0 8px 24px rgba(30, 120, 223, 0.25);
}

.keyone-main-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 16px 0 24px 0;
    font-family: 'Poppins', sans-serif;
}

.keyone-address-container,
.keyone-vouchers-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.keyone-address-container:hover,
.keyone-vouchers-container:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.keyone-address-container h4,
.keyone-vouchers-container h4 {
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
}

.keyone-empty-hint {
    color: #74a9d8;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.keyone-empty-hint a {
    color: var(--primary);
    text-decoration: underline;
}

.keyone-address-buttons-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.keyone-select-button-row {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.keyone-mui-outlined-btn,
.keyone-mui-contained-btn,
.keyone-mui-disabled-btn,
.keyone-select-btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 1px solid #1976d2;
    background: transparent;
    color: #1976d2;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.keyone-address-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.keyone-icon {
    width: 24px;
    height: 24px;
    stroke: #1e78df;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
}

.keyone-address-text {
    font-weight: 600;
}

.keyone-submit-container {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}


.keyone-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 24px 0;
    min-width: 240px;
    min-height: 56px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Animated gradient effect */
.keyone-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    transition: left 0.6s ease;
}

.keyone-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px) scale(1.02);
}

.keyone-submit-btn:hover:not(:disabled)::before {
    left: 100%;
}

.keyone-submit-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.keyone-submit-btn:disabled,
.keyone-submit-btn.keyone-mui-disabled-btn {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    color: var(--text-light);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.6;
}

.keyone-submit-btn:disabled::before,
.keyone-submit-btn.keyone-mui-disabled-btn::before {
    display: none;
}

.keyone-address-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-dark);
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 72px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(30, 120, 223, 0.08);
}

/* Animated gradient effect */
.keyone-address-btn::before,
.keyone-voucher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(30, 120, 223, 0.05) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.keyone-address-btn:hover,
.keyone-voucher-card:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.keyone-address-btn:hover::before,
.keyone-voucher-card:hover::before {
    left: 100%;
}

.keyone-address-btn.keyone-auto-click,
.keyone-voucher-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.keyone-address-btn.keyone-auto-click::before,
.keyone-voucher-card.selected::before {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
}

.keyone-address-btn.keyone-auto-click:hover,
.keyone-voucher-card.selected:hover {
    border-color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(30, 120, 223, 0.35);
}

.keyone-address-btn .keyone-address-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: rgba(30, 120, 223, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.keyone-address-btn:hover .keyone-address-icon,
.keyone-voucher-card:hover .keyone-voucher-code {
    background: rgba(30, 120, 223, 0.15);
    transform: scale(1.1);
}

.keyone-address-btn.keyone-auto-click .keyone-address-icon,
.keyone-voucher-card.selected .keyone-voucher-code {
    background: rgba(255, 255, 255, 0.2);
}

.keyone-address-btn.keyone-auto-click:hover .keyone-address-icon,
.keyone-voucher-card.selected:hover .keyone-voucher-code {
    background: rgba(255, 255, 255, 0.3);
}

.keyone-address-btn.keyone-auto-click .keyone-icon {
    stroke: white !important;
}

.keyone-address-btn .keyone-address-text {
    text-align: left;
    font-weight: 500;
}

.keyone-address-btn.keyone-auto-click .keyone-address-text {
    font-weight: 600;
}

.keyone-select-btn {
    background-color: #1976d2;
    color: white;
    border-color: #1976d2;
    opacity: 1;
}

.keyone-select-btn:hover {
    background-color: #1565c0;
    border-color: #1565c0;
}

/* ################# Voucher Section ################# */
.keyone-vouchers-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.keyone-voucher-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 12px;
    border: 2px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(30, 120, 223, 0.08);
    position: relative;
    overflow: hidden;
}

.keyone-voucher-card.selected .keyone-voucher-discount,
.keyone-voucher-card.selected .keyone-voucher-code {
    color: rgba(255, 255, 255, 0.9);
}

.keyone-voucher-code {
    width: fit-content;
    font-size: 14px;
    font-weight: 600;
    color: #1976d2;
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: rgba(25, 118, 210, 0.1);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.keyone-voucher-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.keyone-voucher-discount,
.keyone-voucher-min-purchase {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #666;
}

.keyone-voucher-discount {
    font-weight: 700;
    color: var(--secondary);
    font-size: 14px;
}

.keyone-voucher-min-purchase {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

@media (max-width: 768px) {
    .keyone-main-container {
        gap: 16px;
        margin: 12px 16px;
    }

    .keyone-address-container,
    .keyone-vouchers-container {
        padding: 16px;
        border-radius: 12px;
    }

    .keyone-address-buttons-row,
    keyone-vouchers-row {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }

    .keyone-address-btn {
        min-height: 64px;
        padding: 14px 16px;
        font-size: 14px;
    }

    .keyone-address-btn .keyone-address-icon {
        width: 28px;
        height: 28px;
    }

    .keyone-submit-btn {
        margin: 16px;
        padding: 14px 24px;
        font-size: 15px;
        min-height: 52px;
    }

    .keyone-voucher-card {
        padding: 14px 16px;
    }

    .keyone-voucher-code {
        font-size: 14px;
        padding: 4px 8px;
    }

    .keyone-voucher-discount,
    .keyone-voucher-min-purchase {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .keyone-vouchers-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 380px) {
    .keyone-submit-btn {
        min-width: 100%;
    }
}