/* Optimise Vouchers CSS */
.optimise-vouchers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.optimise-vouchers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.optimise-voucher-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.voucher-img{
    width:100%;
    height:350px;
    object-fit:cover;
}
.optimise-voucher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.optimise-voucher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.voucher-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.voucher-company {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
    flex: 1;
}

.voucher-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 10px;
}

.status-live {
    background: #4CAF50;
    color: white;
}

.status-pending {
    background: #FF9800;
    color: white;
}

.status-expired {
    background: #f44336;
    color: white;
}

.voucher-title {
    font-size: 1.1em;
    margin: 10px 0;
    font-weight: 600;
    line-height: 1.3;
}

.voucher-description {
    font-size: 0.9em;
    margin: 15px 0;
    line-height: 1.4;
    opacity: 0.9;
}

.voucher-code-section {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 2px dashed rgba(255,255,255,0.3);
}

.voucher-code {
    font-family: 'Courier New', monospace;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
    margin: 10px 0;
    user-select: all;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voucher-code:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    padding: 5px;
}

.copy-hint {
    font-size: 0.8em;
    text-align: center;
    opacity: 0.7;
    margin-top: 5px;
}

.voucher-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.voucher-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9em;
    display: inline-block;
}

.btn-primary {
    background: rgba(255,255,255,0.9);
    color: #333;
}

.btn-primary:hover {
    background: white;
    color:#333 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

.exclusive-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #FF6B6B;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
}

.voucher-refresh {
    text-align: center;
    margin: 20px 0;
}

.refresh-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #f44336;
    margin: 20px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .optimise-vouchers-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .optimise-voucher-card {
        padding: 20px;
    }
    
    .voucher-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .voucher-status {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .voucher-actions {
        flex-direction: column;
    }
    
    .voucher-code {
        font-size: 1.1em;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .optimise-vouchers-container {
        padding: 10px;
    }
    
    .optimise-voucher-card {
        padding: 15px;
    }
    
    .voucher-code {
        font-size: 1em;
    }
}

/* Animation for copy feedback */
@keyframes copySuccess {
    0% { background: rgba(76, 175, 80, 0.3); }
    100% { background: rgba(255,255,255,0.2); }
}

.copy-success {
    animation: copySuccess 0.5s ease;
}

/* Custom image styles */
.voucher-custom-image {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.voucher-custom-image img {
    transition: transform 0.3s ease;
}

.voucher-custom-image img:hover {
    transform: scale(1.05);
}

/* Custom badge styles */
.custom-badge {
    display: inline-block;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced voucher description with custom indicator */
.voucher-description {
    position: relative;
}

.voucher-description:has(.custom-badge) {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    margin: 15px 0;
}

/* Admin customizer quick access */
.voucher-admin-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.optimise-voucher-card:hover .voucher-admin-hint {
    opacity: 1;
}

/* Print styles */
@media print {
    .optimise-voucher-card {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: 2px solid #ccc !important;
        break-inside: avoid;
    }
    
    .voucher-actions {
        display: none;
    }
    
    .custom-badge,
    .voucher-admin-hint {
        display: none;
    }
} 