/* UseePay Brand Colors */
:root {
    --useepay-primary: #0066CC;
    --useepay-primary-dark: #0052A3;
    --useepay-primary-light: #E6F2FF;
    --useepay-secondary: #00A8E8;
    --useepay-success: #00C851;
    --useepay-warning: #FF8800;
    --useepay-error: #FF4444;
    --useepay-gray-light: #F8F9FA;
    --useepay-gray-medium: #6C757D;
    --useepay-gray-dark: #343A40;
}

/* UseePay Settings Page Styles */
.useepay-settings-wrapper {
    background: var(--useepay-gray-light);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #E0E0E0;
}

.useepay-settings-header {
    border-bottom: 2px solid var(--useepay-primary);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.useepay-settings-header h1 {
    color: var(--useepay-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.useepay-settings-header p {
    color: var(--useepay-gray-medium);
    font-size: 14px;
    margin: 8px 0 0 0;
}

/* Form Input Improvements */
.woocommerce-useepay-settings input[type="text"],
.woocommerce-useepay-settings input[type="password"],
.woocommerce-useepay-settings textarea,
.woocommerce-useepay-settings select {
    border: 1px solid #D0D0D0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin: 0;
}

.woocommerce-useepay-settings input[type="text"]:focus,
.woocommerce-useepay-settings input[type="password"]:focus,
.woocommerce-useepay-settings textarea:focus,
.woocommerce-useepay-settings select:focus {
    border-color: var(--useepay-primary);
    box-shadow: 0 0 0 2px var(--useepay-primary-light);
    outline: none;
}

/* Fix input padding issues */
.woocommerce-useepay-settings input[style*="width:360px"] {
    width: 360px !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
}

.woocommerce-useepay-settings textarea[style*="width:400px"] {
    width: 400px !important;
    height: 80px !important;
    padding: 8px 12px !important;
    box-sizing: border-box !important;
    resize: vertical;
}

/* Form Table Improvements */
.woocommerce-useepay-settings .form-table th {
    font-weight: 600;
    color: var(--useepay-gray-dark);
    padding: 15px 15px 15px 0;
    vertical-align: top;
}

.woocommerce-useepay-settings .form-table td {
    padding: 15px 0;
    vertical-align: top;
}

/* Section Headers */
.woocommerce-useepay-settings h2 {
    color: var(--useepay-primary);
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 8px;
    margin: 30px 0 15px 0;
}

/* Description Text */
.woocommerce-useepay-settings .description {
    color: var(--useepay-gray-medium);
    font-size: 13px;
    font-style: italic;
    margin-top: 5px;
    line-height: 1.4;
}

/* Button Styles */
.woocommerce-useepay-settings .button-primary {
    background: var(--useepay-primary);
    border-color: var(--useepay-primary);
    color: white;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.woocommerce-useepay-settings .button-primary:hover {
    background: var(--useepay-primary-dark);
    border-color: var(--useepay-primary-dark);
}

/* Success Messages */
.woocommerce-useepay-settings .notice-success {
    border-left-color: var(--useepay-success);
    background-color: #F0FFF4;
}

/* Error Messages */
.woocommerce-useepay-settings .notice-error {
    border-left-color: var(--useepay-error);
    background-color: #FFF5F5;
}

/* Warning Messages */
.woocommerce-useepay-settings .notice-warning {
    border-left-color: var(--useepay-warning);
    background-color: #FFFBF0;
}

/* Info Box */
.useepay-info-box {
    background: var(--useepay-primary-light);
    border: 1px solid var(--useepay-primary);
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
}

.useepay-info-box h3 {
    color: var(--useepay-primary);
    margin: 0 0 10px 0;
    font-size: 16px;
}

.useepay-info-box ul {
    margin: 0;
    padding-left: 20px;
}

.useepay-info-box li {
    margin-bottom: 5px;
    color: var(--useepay-gray-dark);
}

/* Loading Styles */
.useepay-page-loading {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--useepay-primary-light) 0%, #ffffff 100%);
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.useepay-page-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: useepay-shimmer 2s infinite;
}

@keyframes useepay-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.useepay-loading-container {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.useepay-loading-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--useepay-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: useepay-pulse 2s infinite;
}

@keyframes useepay-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.useepay-loading-logo::before {
    content: 'UP';
    color: white;
    font-weight: bold;
    font-size: 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.useepay-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 3px solid rgba(0, 102, 204, 0.1);
    border-top: 3px solid var(--useepay-primary);
    border-radius: 50%;
    animation: useepay-spin 1s linear infinite;
}

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

.useepay-loading-text {
    color: var(--useepay-gray-dark);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.useepay-loading-subtext {
    color: var(--useepay-gray-medium);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.useepay-loading-dots {
    display: inline-block;
    width: 60px;
    text-align: left;
}

.useepay-loading-dots::after {
    content: '';
    animation: useepay-dots 1.5s infinite;
}

@keyframes useepay-dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Payment Form Loading */
.useepay-form-loading {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
}

.useepay-form-loading .useepay-loading-spinner {
    margin: 0;
    width: 32px;
    height: 32px;
    border-width: 2px;
}

/* Secure Badge */
.useepay-secure-badge {
    display: inline-flex;
    align-items: center;
    background: #f0fff4;
    border: 1px solid #00c851;
    border-radius: 20px;
    padding: 4px 12px;
    margin-top: 16px;
    font-size: 12px;
    color: #00c851;
    font-weight: 500;
}

.useepay-secure-badge::before {
    content: '🔒';
    margin-right: 4px;
}

/* Card Icons Loading */
.useepay-cards-loading {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.useepay-card-icon {
    width: 32px;
    height: 20px;
    background: #e0e0e0;
    border-radius: 4px;
    animation: useepay-card-pulse 1.5s infinite;
}

.useepay-card-icon:nth-child(2) {
    animation-delay: 0.2s;
}

.useepay-card-icon:nth-child(3) {
    animation-delay: 0.4s;
}

.useepay-card-icon:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes useepay-card-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Full Page Loading */
.useepay-fullpage-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--useepay-primary-light) 0%, #ffffff 50%, var(--useepay-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

.useepay-fullpage-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: useepay-shimmer 3s infinite;
}

.useepay-fullpage-loading .useepay-loading-container {
    text-align: center;
    z-index: 1;
}

.useepay-fullpage-loading .useepay-loading-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: var(--useepay-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: useepay-pulse 3s infinite;
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

.useepay-fullpage-loading .useepay-loading-logo::before {
    content: 'UP';
    color: white;
    font-weight: bold;
    font-size: 36px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.useepay-fullpage-loading .useepay-loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    border: 4px solid rgba(0, 102, 204, 0.1);
    border-top: 4px solid var(--useepay-primary);
    border-radius: 50%;
    animation: useepay-spin 1s linear infinite;
}

.useepay-fullpage-loading .useepay-loading-text {
    color: var(--useepay-gray-dark);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.useepay-fullpage-loading .useepay-loading-subtext {
    color: var(--useepay-gray-medium);
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 20px;
}

.useepay-fullpage-loading .useepay-cards-loading {
    margin-top: 30px;
}

.useepay-fullpage-loading .useepay-card-icon {
    width: 48px;
    height: 30px;
    background: linear-gradient(45deg, #e0e0e0, #f0f0f0);
    border-radius: 6px;
    animation: useepay-card-pulse 2s infinite;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .useepay-page-loading {
        padding: 40px 16px;
        margin: 16px 0;
    }
    
    .useepay-loading-logo {
        width: 60px;
        height: 60px;
    }
    
    .useepay-loading-logo::before {
        font-size: 18px;
    }
    
    .useepay-loading-spinner {
        width: 32px;
        height: 32px;
    }
    
    .useepay-loading-text {
        font-size: 14px;
    }
    
    .useepay-loading-subtext {
        font-size: 12px;
    }
    
    .useepay-fullpage-loading .useepay-loading-logo {
        width: 80px;
        height: 80px;
    }
    
    .useepay-fullpage-loading .useepay-loading-logo::before {
        font-size: 24px;
    }
    
    .useepay-fullpage-loading .useepay-loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .useepay-fullpage-loading .useepay-loading-text {
        font-size: 16px;
    }
    
    .useepay-fullpage-loading .useepay-loading-subtext {
        font-size: 14px;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .woocommerce-useepay-settings .form-table th,
    .woocommerce-useepay-settings .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .woocommerce-useepay-settings input[style*="width:360px"],
    .woocommerce-useepay-settings textarea[style*="width:400px"] {
        width: 100% !important;
        max-width: 400px;
    }
}