/* Email Template Preview Styles */

.email-preview-container {
    background: #ffffff;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.email-client-header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 16px;
    font-size: 13px;
}

.email-client-header .btn {
    font-size: 11px;
    padding: 4px 8px;
}

.email-content {
    background: #ffffff;
    margin: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.email-headers {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    font-size: 14px;
}

.email-headers .row {
    margin-bottom: 8px;
}

.email-headers .row:last-child {
    margin-bottom: 0;
}

.email-headers strong {
    color: #495057;
    font-weight: 600;
}

.email-avatar {
    width: 32px;
    height: 32px;
    background: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.email-avatar i {
    font-size: 12px;
    color: white;
}

.email-from-info {
    min-width: 0;
}

.email-from-name {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-from-email {
    font-size: 12px;
    color: #666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-body {
    padding: 0;
    background: #ffffff;
    max-height: 500px;
    overflow-y: auto;
}

.email-body-content {
    min-height: 200px;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
}

.email-client-footer {
    padding: 12px 16px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.email-client-footer small {
    color: #6c757d;
    font-size: 12px;
}

/* Email Template Content Styles */
.email-template-wrapper {
    width: 100%;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 20px 0;
    box-sizing: border-box;
}

.email-template-container {
    max-width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.email-template-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    padding: 30px 20px;
    text-align: center;
}

.email-template-logo {
    background-color: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.email-template-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.email-template-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.email-template-body {
    padding: 30px 20px;
    color: #333333;
    font-size: 15px;
    line-height: 1.6;
}

.email-template-body p {
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.email-template-body p:last-child {
    margin-bottom: 0;
}

.email-template-body a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.email-template-body a:hover {
    text-decoration: underline;
}

.email-template-body strong {
    font-weight: 600;
    color: #212529;
}

.email-template-body em {
    font-style: italic;
    color: #495057;
}

.email-template-cta {
    padding: 0 20px 30px 20px;
}

.email-template-help {
    background-color: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    text-align: center;
}

.email-template-help p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.email-template-help a {
    color: #007bff;
    text-decoration: none;
}

.email-template-help a:hover {
    text-decoration: underline;
}

.email-template-footer {
    background-color: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.email-template-footer-company {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.email-template-footer-copyright {
    margin: 0;
    color: #999;
    font-size: 11px;
    line-height: 1.4;
}

/* Preview Mode Buttons */
.preview-mode-toggle {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #dee2e6;
}

.preview-mode-toggle .btn {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #6c757d;
    transition: all 0.15s ease-in-out;
}

.preview-mode-toggle .btn.active {
    background: #ffffff;
    color: #495057;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Template Information Panel */
.template-info-panel .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
}

.template-info-panel .card-header h6 {
    margin: 0;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
}

.template-info-panel .card-body {
    padding: 16px;
    font-size: 13px;
}

.template-info-panel .row {
    margin-bottom: 8px;
}

.template-info-panel .row:last-child {
    margin-bottom: 0;
}

.template-info-panel strong {
    color: #495057;
    font-weight: 600;
}

/* Variables Panel */
.variables-panel .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
}

.variables-panel .card-body {
    padding: 16px;
}

.variables-panel .variable-item {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 11px;
    color: #e83e8c;
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 4px;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .email-preview-container {
        min-height: 400px;
    }
    
    .email-content {
        margin: 8px;
    }
    
    .email-headers {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .email-template-header {
        padding: 20px 16px;
    }
    
    .email-template-title {
        font-size: 20px;
    }
    
    .email-template-body {
        padding: 20px 16px;
        font-size: 14px;
    }
}

/* Scrollbar styling for email body */
.email-body::-webkit-scrollbar {
    width: 6px;
}

.email-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.email-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.email-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for loading states */
.email-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #6c757d;
    font-size: 14px;
}

.email-preview-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

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

/* Enhanced variables display */
.variables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 576px) {
    .variables-grid {
        grid-template-columns: 1fr;
    }
} 