/* NB Online Voucher Styles */

.nb-online-voucher-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nb-online-voucher-container h2 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.nb-online-voucher-form {
    margin-bottom: 30px;
}

.nb-online-voucher-form .form-group {
    margin-bottom: 20px;
}

.nb-online-voucher-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.nb-online-voucher-form input[type="text"],
.nb-online-voucher-form input[type="email"],
.nb-online-voucher-form input[type="number"],
.nb-online-voucher-form input[type="date"],
.nb-online-voucher-form select,
.nb-online-voucher-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.nb-online-voucher-form input:focus,
.nb-online-voucher-form select:focus,
.nb-online-voucher-form textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.nb-online-voucher-form .btn {
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.nb-online-voucher-form .btn:hover {
    background: #005a87;
}

.nb-online-voucher-form .btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Voucher Result Styles */
.voucher-result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid;
}

.voucher-result.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.voucher-result.error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.voucher-result.info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Voucher Display */
.voucher-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.voucher-display .voucher-code {
    font-size: 2em;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.voucher-display .voucher-amount {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.voucher-display .voucher-details {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Status Indicators */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #ffc107;
    color: #856404;
}

.status-badge.active {
    background: #28a745;
    color: white;
}

.status-badge.used {
    background: #6c757d;
    color: white;
}

.status-badge.expired {
    background: #dc3545;
    color: white;
}

/* Loading States */
.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nb-online-voucher-container {
        margin: 10px;
        padding: 15px;
    }
    
    .voucher-display .voucher-code {
        font-size: 1.5em;
    }
    
    .voucher-display .voucher-amount {
        font-size: 1.2em;
    }
}

/* Admin Styles */
.post-type-nb_online_voucher .wp-list-table .column-title {
    width: 25%;
}

.post-type-nb_online_voucher .wp-list-table .column-voucher_code {
    width: 15%;
}

.post-type-nb_online_voucher .wp-list-table .column-amount {
    width: 10%;
}

.post-type-nb_online_voucher .wp-list-table .column-status {
    width: 10%;
}

.post-type-nb_online_voucher .wp-list-table .column-expiry_date {
    width: 15%;
}

/* Form Validation */
.form-group.error input {
    border-color: #dc3545;
}

.form-group.error .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Success Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voucher-result {
    animation: fadeInUp 0.5s ease-out;
}

/* Copy to Clipboard Button */
.copy-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.copy-btn:hover {
    background: #218838;
}

.copy-btn.copied {
    background: #0073aa;
}
