/* Thrive Apprentice Square Payments Styles */

/* Modal Header Styling (non-critical) */
.tva-square-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    position: relative;
}

#tva-square-modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 300;
}

#tva-square-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#tva-square-close-btn:hover {
    opacity: 1 !important;
}

/* Modal Content Styling */
.tva-square-modal-content {
    padding: 30px;
}

#tva-square-loading {
    text-align: center;
    padding: 40px;
}

/* Spinner Animation */
@keyframes tva-square-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tva-square-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: tva-square-spin 2s linear infinite;
    margin: 0 auto 20px;
}

/* Form Sections */
.tva-square-form-section {
    margin-bottom: 30px;
}

.tva-square-section-title {
    color: #495057;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Form Layout */
.tva-square-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tva-square-form-group {
    flex: 1;
    margin-bottom: 20px;
}

.tva-square-form-group.full-width {
    flex: 1 1 100%;
}

/* Form Elements */
.tva-square-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.tva-square-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background-color: white;
    transition: all 0.3s ease;
}

.tva-square-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.tva-square-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Card Container */
.tva-square-card-container {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    min-height: 90px;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.tva-square-card-container:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Payment Button */
.tva-square-pay-btn {
    width: 100%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.3);
}

.tva-square-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
}

.tva-square-pay-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Required Field Indicator */
.tva-square-required {
    color: #dc3545;
}

/* Close Button Hover */
#tva-square-close-btn:hover {
    opacity: 1 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tva-square-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    #tva-square-payment-container {
        padding: 20px;
        margin: 10px;
        max-width: 95% !important;
    }
}

/* Success/Error Messages */
.tva-square-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
}

.tva-square-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
}

.tva-square-success h3,
.tva-square-error h3 {
    margin: 0 0 10px 0;
}

.tva-square-success p,
.tva-square-error p {
    margin: 5px 0;
}

/* Loading State */
.tva-square-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Animation for modal entrance */
#tva-square-payment-modal.show {
    opacity: 1;
}

#tva-square-payment-modal.show #tva-square-payment-container {
    transform: scale(1);
}

#tva-square-payment-form {
 .tva-square-section-title {
    margin-top: 30px;
    margin-bottom: 10px;
 }   
}