/**
 * Frontend styles for Simple Membership Gift Extension
 */

/* Debug: Check if CSS is loaded */
body::before {
    content: "SMG CSS Loaded";
    position: fixed;
    top: 0;
    left: 0;
    background: #000;
    color: #fff;
    padding: 5px;
    font-size: 12px;
    z-index: 9999;
    display: block; /* Change to block to see debug message */
}

/* Button Styles */
.smg-buy-button-container {
    margin: 20px 0;
    text-align: center;
}

.smg-btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 200px;
}

.smg-btn-primary {
    background: #3498db;
    color: white;
}

.smg-btn-primary:hover {
    background: #2980b9;
    color: white;
}

.smg-btn-secondary {
    background: #e74c3c;
    color: white;
}

.smg-btn-secondary:hover {
    background: #c0392b;
    color: white;
}

.smg-btn-full {
    width: 100%;
    min-width: auto;
}

/* Modal Styles */
.smg-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.smg-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.smg-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.smg-modal-close:hover {
    color: #000;
}

/* Form Styles */
.smg-membership-form {
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.smg-form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.smg-form-section:last-child {
    border-bottom: none;
}

.smg-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.smg-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.smg-form-row .smg-form-group {
    flex: 1;
}

.smg-form-group {
    margin-bottom: 20px;
}

.smg-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.smg-form-group input,
.smg-form-group textarea,
.smg-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.smg-form-group input:focus,
.smg-form-group textarea:focus,
.smg-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.smg-form-group input::placeholder,
.smg-form-group textarea::placeholder {
    color: #6c757d;
    font-style: italic;
}

.smg-form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    margin-top: 2px;
}

.smg-form-group label input[type="radio"] {
    margin-right: 8px;
}

/* Radio button groups */
.smg-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.smg-radio-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.smg-radio-item:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.smg-radio-item input[type="radio"] {
    margin-right: 12px;
    margin-top: 2px;
}

.smg-radio-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.4;
}

/* Checkbox groups */
.smg-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.smg-checkbox-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
}

.smg-checkbox-item:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.smg-checkbox-item input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
}

.smg-checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.4;
}

/* Form submit button */
.smg-form-submit {
    width: 100%;
    padding: 14px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smg-form-submit:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.smg-form-submit:active {
    transform: translateY(0);
}

.smg-form-submit:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Payment Page Styles */
.smg-payment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.smg-payment-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.smg-payment-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.smg-payment-summary {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.smg-payment-summary h3 {
    color: #2c3e50;
    margin-top: 0;
}

.smg-order-details p {
    margin: 10px 0;
    font-size: 16px;
}

.smg-amount {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
}

.smg-payment-methods {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.smg-payment-methods h3 {
    color: #2c3e50;
    margin-top: 0;
}

.smg-payment-method {
    margin-top: 20px;
}

.smg-payment-method h4 {
    color: #34495e;
    margin-bottom: 20px;
}

.smg-payment-actions {
    margin-top: 30px;
}

.smg-payment-footer {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 30px;
}

/* Success/Cancel Page Styles */
.smg-success-container,
.smg-cancel-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    font-family: Arial, sans-serif;
}

.smg-success-icon,
.smg-cancel-icon {
    margin-bottom: 30px;
}

.smg-checkmark,
.smg-x {
    display: inline-block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 40px;
    line-height: 80px;
    font-weight: bold;
}

.smg-checkmark {
    background: #27ae60;
    color: white;
}

.smg-x {
    background: #e74c3c;
    color: white;
}

.smg-success-container h1,
.smg-cancel-container h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.smg-success-details,
.smg-cancel-details {
    margin: 30px 0;
    text-align: left;
}

.smg-membership-info,
.smg-gift-info,
.smg-activation-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.smg-code {
    font-family: monospace;
    font-weight: bold;
    color: #e74c3c;
    background: white;
    padding: 5px 10px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.smg-success-actions,
.smg-cancel-actions {
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smg-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .smg-modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .smg-payment-container {
        padding: 10px;
    }
    
    .smg-payment-summary,
    .smg-payment-methods {
        padding: 20px;
    }
}

/* Loading States */
.smg-loading {
    opacity: 0.6;
    pointer-events: none;
}

.smg-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 #3498db;
    border-radius: 50%;
    animation: smg-spin 1s linear infinite;
}

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

/* Error States */
.smg-error {
    color: #e74c3c;
    background: #fdf2f2;
    border: 1px solid #fecaca;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.smg-success {
    color: #27ae60;
    background: #f0f9ff;
    border: 1px solid #b3e5b3;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Utility Classes */
.smg-text-center {
    text-align: center;
}

.smg-text-left {
    text-align: left;
}

.smg-text-right {
    text-align: right;
}

.smg-mb-20 {
    margin-bottom: 20px;
}

.smg-mt-20 {
    margin-top: 20px;
}

.smg-hidden {
    display: none;
}

.smg-visible {
    display: block;
}

/* QR Code Section Styles */
.smg-qr-section {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.smg-qr-section h3 {
    margin-bottom: 15px;
    color: #2c2c2c;
    font-size: 20px;
    font-weight: 600;
}

.smg-qr-container {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: inline-block;
}

.smg-qr-code {
    max-width: 200px;
    height: auto;
    border-radius: 8px;
}

.smg-qr-description {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}


/* Success Page Additional Styles */
.smg-success-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.smg-success-details {
    margin: 30px 0;
}

.smg-success-details > div {
    margin-bottom: 30px;
}

.smg-success-details h3 {
    margin-bottom: 15px;
    color: #2c2c2c;
    font-size: 18px;
    font-weight: 600;
}

.smg-success-actions {
    margin-top: 40px;
    text-align: center;
}

.smg-success-actions .smg-btn {
    margin: 10px;
    min-width: 150px;
}

.smg-btn-secondary {
    background: #6c757d;
    color: white;
}

.smg-btn-secondary:hover {
    background: #5a6268;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .smg-qr-code {
        max-width: 150px;
    }
    
    .smg-success-container {
        padding: 20px 15px;
    }
}
