/* Simple Gift Cards - Frontend Styles */

.sgc-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header Styles */
.sgc-header {
    text-align: center;
    margin-bottom: 30px;
}

.sgc-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 300;
}

.sgc-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.sgc-subtitle {
    font-size: 1.2rem;
    color: #34495e;
    font-weight: 500;
}

/* Step Styles */
.sgc-step {
    display: none;
}

.sgc-step-active {
    display: block;
}

/* Card Selection Styles */
.sgc-cards-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.sgc-card-option {
    border: 2px solid #ecf0f1;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
}

.sgc-card-option:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transform: translateY(-2px);
}

.sgc-card-option.selected {
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.15);
    background: #fdf2f2;
}

.sgc-card-option.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.sgc-card-visual {
    text-align: center;
    margin-bottom: 15px;
}

.sgc-card-design {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2rem;
    margin-bottom: 10px;
}

.sgc-card-design img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.sgc-card-placeholder {
    font-size: 3rem;
}

.sgc-card-info {
    text-align: center;
}

.sgc-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.sgc-card-duration {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.sgc-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 10px;
}

.sgc-amount {
    font-size: 1.8rem;
}

.sgc-currency {
    font-size: 1rem;
    margin-left: 5px;
}

.sgc-card-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Form Styles */
.sgc-form {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sgc-selected-card-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.sgc-selected-card-info h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.sgc-selected-card-info p {
    color: #7f8c8d;
    margin: 0;
}

.sgc-form-section {
    margin-bottom: 25px;
}

.sgc-form-section h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ecf0f1;
}

.sgc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.sgc-form-row.single-column {
    grid-template-columns: 1fr;
}

.sgc-form-group {
    position: relative;
}

.sgc-form-group input,
.sgc-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.sgc-form-group input:focus,
.sgc-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.sgc-form-group input.error,
.sgc-form-group textarea.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

/* Delivery Options */
.sgc-delivery-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.sgc-delivery-option {
    flex: 1;
}

.sgc-delivery-option input[type="radio"] {
    display: none;
}

.sgc-delivery-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.sgc-delivery-option input[type="radio"]:checked + label {
    border-color: #3498db;
    background: #f0f8ff;
    color: #3498db;
}

.sgc-delivery-option label:hover {
    border-color: #3498db;
}

.sgc-delivery-icon {
    font-size: 1.5rem;
    margin-right: 8px;
}

.sgc-delivery-text {
    font-weight: 500;
}

.sgc-delivery-options.error {
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 10px;
    background: #fdf2f2;
}

/* Form Footer */
.sgc-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
    margin-top: 30px;
}

.sgc-price-display {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.sgc-purchase-btn,
.sgc-validate-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
}

.sgc-purchase-btn:hover,
.sgc-validate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.sgc-purchase-btn:disabled,
.sgc-validate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.sgc-btn-loading {
    display: none;
}

/* Loading Overlay */
.sgc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.sgc-loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.sgc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sgc-loading-content p {
    color: #2c3e50;
    font-size: 1.1rem;
    margin: 0;
}

/* Validation Results */
.sgc-validation-results {
    margin-top: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.sgc-results-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#sgc-gift-card-details {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ecf0f1;
}

/* No Data States */
.sgc-no-cards,
.sgc-no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sgc-container {
        padding: 10px;
    }
    
    .sgc-header h1 {
        font-size: 2rem;
    }
    
    .sgc-cards-selection {
        grid-template-columns: 1fr;
    }
    
    .sgc-form-row {
        grid-template-columns: 1fr;
    }
    
    .sgc-delivery-options {
        flex-direction: column;
    }
    
    .sgc-form-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .sgc-purchase-btn,
    .sgc-validate-btn {
        width: 100%;
    }
}

/* Admin Styles */
.sgc-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sgc-filters select,
.sgc-filters input {
    margin-right: 10px;
}

.sgc-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.sgc-status-active {
    background: #d4edda;
    color: #155724;
}

.sgc-status-used {
    background: #d1ecf1;
    color: #0c5460;
}

.sgc-status-expired {
    background: #f8d7da;
    color: #721c24;
}

.sgc-status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.sgc-actions {
    margin-bottom: 20px;
}

.sgc-pagination {
    margin-top: 20px;
    text-align: center;
}

.sgc-shortcodes {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sgc-shortcodes code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}
