/* My Vouchers Page Styles */
.voucher-system-container {
    max-width: 1000px;
    margin: 0 auto;
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.voucher-header-actions {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.voucher-input-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.voucher-input-label {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.voucher-input-text {
    flex-grow: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.voucher-input-text:focus {
    border-color: #0984E3;
    outline: none;
}

.voucher-btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-transform: uppercase;
    font-size: 14px;
}

.voucher-btn--primary {
    background: #00b894;
    color: #ffffff !important;
}
.voucher-btn--primary:hover {
    background: #00a884;
}

.voucher-card .btn-use-voucher {
    background: #ffffff;
    color: #e74c3c !important;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 6px 16px;
}
.voucher-card .btn-use-voucher:hover {
    background: #fdf2f2;
}

.voucher-card--product .btn-use-voucher {
    color: #0984e3 !important;
    border-color: #0984e3;
}
.voucher-card--product .btn-use-voucher:hover {
    background: #f0f8ff;
}

.voucher-card--shipping .btn-use-voucher {
    color: #00b894 !important;
    border-color: #00b894;
}
.voucher-card--shipping .btn-use-voucher:hover {
    background: #e6f9f5;
}

.voucher-btn--secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
.voucher-btn--secondary:hover {
    background: #e9e9e9;
}

.voucher-btn--claim {
    background: #fff;
    color: #00b894;
    border: 1px solid #00b894;
    padding: 6px 16px;
    border-radius: 4px;
}
.voucher-btn--claim:hover {
    background: #e6f9f5;
}

/* Tabs */
.voucher-tabs .tabs-nav {
    display: flex;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 24px;
    padding: 0;
    list-style: none;
}

.voucher-tabs .tab-item {
    margin: 0;
}

.voucher-tabs .tab-link {
    display: block;
    padding: 12px 24px;
    color: #666;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}

.voucher-tabs .tab-item.active .tab-link {
    color: #00b894;
}

.voucher-tabs .tab-item.active .tab-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00b894;
}

.tab-content {
    display: none;
}
.tab-content.active-content {
    display: block;
}

/* Grid */
.voucher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

/* Cards */
.voucher-card {
    display: flex;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    position: relative;
    min-height: 140px;
    height: auto;
}

.voucher-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.voucher-card__left {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    padding: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.voucher-card--product .voucher-card__left {
    background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
}

.voucher-card--shipping .voucher-card__left {
    background: linear-gradient(135deg, #00b894 0%, #55efc4 100%);
}

/* Scallop edge effect */
.voucher-card__left::before, .voucher-card__left::after {
    content: '';
    position: absolute;
    right: -10px;
    width: 20px;
    height: 20px;
    background: #f8f8f8; /* Should match page bg */
    border-radius: 50%;
}
.voucher-card__left::before { top: -10px; }
.voucher-card__left::after { bottom: -10px; }

.voucher-icon svg {
    width: 44px;
    height: 44px;
    margin: 0 auto;
}

.voucher-icon img.voucher-card-img {
    max-width: 100px;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
}

.icon-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.voucher-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.15);
    padding: 4px 0;
    font-size: 10px;
    font-weight: 600;
}

.voucher-card__right {
    flex-grow: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.voucher-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.voucher-min-order {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
}

.voucher-urgency {
    font-size: 12px;
    color: #e74c3c;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.voucher-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.voucher-validity {
    font-size: 12px;
    color: #999;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-link-tnc {
    font-size: 12px;
    color: #0984E3;
    text-decoration: none;
}
.action-link-tnc:hover {
    text-decoration: underline;
}

.voucher-multiplier {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffecd2;
    color: #e67e22;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}



@media (max-width: 768px) {
    .voucher-grid {
        grid-template-columns: 1fr;
    }
    .voucher-input-group {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Hide the original entry point on checkout page because we use a Knockout UI Component for it */
.checkout-index-index #voucher-picker-app > .voucher-cart-entry {
    display: none !important;
}
