/* Email Test Tab Styles for Admin Dashboard */

.email-test-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

/* Configuration Status Card */
.config-status-card {
    background: linear-gradient(135deg, rgba(20, 255, 114, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 1px solid rgba(20, 255, 114, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-header h3 {
    color: #14ff72;
    margin: 0;
    font-size: 1.2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s ease;
}

.status-dot.success {
    background: #14ff72;
    box-shadow: 0 0 10px rgba(20, 255, 114, 0.5);
}

.status-text {
    color: #fff;
    font-weight: 500;
}

.config-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.config-label {
    color: #ccc;
    font-weight: 500;
}

.config-value {
    color: #14ff72;
    font-family: monospace;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Test Email Card */
.test-email-card {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(20, 255, 114, 0.1) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.test-header h3 {
    color: #00d4ff;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.test-header p {
    color: #ccc;
    margin: 0 0 1.5rem 0;
}

.test-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.test-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Test Results */
.test-results {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header h4 {
    color: #fff;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.result-success {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(20, 255, 114, 0.1);
    border: 1px solid rgba(20, 255, 114, 0.3);
    border-radius: 8px;
}

.result-error {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 87, 87, 0.1);
    border: 1px solid rgba(255, 87, 87, 0.3);
    border-radius: 8px;
}

.result-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-text h4 {
    color: #fff;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.result-text p {
    color: #ccc;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* Templates Card */
.templates-card {
    background: linear-gradient(135deg, rgba(255, 87, 87, 0.1) 0%, rgba(20, 255, 114, 0.1) 100%);
    border: 1px solid rgba(255, 87, 87, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.templates-header h3 {
    color: #ff5757;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.templates-header p {
    color: #ccc;
    margin: 0 0 1.5rem 0;
}

.template-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.template-tab {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.template-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.template-tab.active {
    background: rgba(255, 87, 87, 0.2);
    border-color: rgba(255, 87, 87, 0.4);
    color: #ff5757;
}

.template-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-header h4 {
    color: #fff;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.preview-header p {
    color: #ccc;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.email-preview {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    color: #333;
    font-family: Arial, sans-serif;
    max-width: 100%;
    overflow-x: auto;
}

.email-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.email-body {
    line-height: 1.6;
}

.email-body p {
    margin: 0.5rem 0;
}

.email-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    border-left: 4px solid #14ff72;
}

.email-details ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.email-details ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.key-display {
    background: rgba(20, 255, 114, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1.1rem;
    text-align: center;
    margin: 0.5rem 0;
    border: 2px solid rgba(20, 255, 114, 0.3);
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .email-test-container {
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .config-details {
        grid-template-columns: 1fr;
    }
    
    .test-buttons {
        flex-direction: column;
    }
    
    .template-tabs {
        flex-direction: column;
    }
    
    .status-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Animation for status updates */
@keyframes statusPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.status-dot.success {
    animation: statusPulse 2s infinite;
}

/* Loading states */
.btn-icon .fa-spinner {
    animation: spin 1s linear infinite;
}

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