/* Email Client Styles */

/* Login Page */
.vsl-email-login-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vsl-email-login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.vsl-email-login-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.vsl-email-login-box h1 {
    margin: 0 0 30px 0;
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

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

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

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    box-sizing: border-box;
}

#attachment-list {
    font-size: 14px;
    margin-top: 10px;
}

.selected-files-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.file-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-item {
    margin-bottom: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-item:hover {
    border-color: #667eea;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.remove-file-btn {
    transition: background 0.2s;
}

.remove-file-btn:hover {
    background: #c82333 !important;
}

#upload-progress {
    margin-top: 15px;
}

#upload-progress-bar {
    min-width: 50px;
    padding: 0 5px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

#upload-status {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #5568d3;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Dashboard */
.vsl-email-dashboard {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

.vsl-email-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.vsl-email-header {
    background: #fff;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vsl-email-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: #666;
    font-size: 14px;
}

.btn-logout {
    padding: 8px 16px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c82333;
}

.vsl-email-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.vsl-email-sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
}

.btn-compose {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.btn-compose:hover {
    background: #5568d3;
}

.vsl-email-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vsl-email-nav li {
    margin-bottom: 5px;
}

.vsl-email-nav a {
    display: block;
    padding: 12px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
}

.vsl-email-nav a:hover,
.vsl-email-nav a.active {
    background: #f0f0f0;
    color: #667eea;
    font-weight: 500;
}

.vsl-email-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.email-list-container {
    flex: 1;
    overflow-y: auto;
    background: #fff;
}

.email-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-item:hover {
    background: #f9f9f9;
}

.email-item.unread {
    background: #f8f9ff;
    font-weight: 500;
}

.email-item-info {
    flex: 1;
    min-width: 0;
}

.email-item-from {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.email-item-subject {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-date {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
    margin-left: 15px;
}

.email-view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow-y: auto;
}

.email-view-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
}

.btn-back {
    padding: 8px 16px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.email-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 8px 16px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-action:hover {
    background: #5568d3;
}

.email-content {
    padding: 30px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.email-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.email-header h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
}

.email-header-meta {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

.email-header-meta strong {
    color: #333;
}

.email-body {
    color: #333;
    line-height: 1.8;
    font-size: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.email-body img {
    max-width: 100%;
    height: auto;
}

.email-body table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

.email-body pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.email-attachments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.email-attachments h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.attachment-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 10px;
}

.attachment-item a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.attachment-item a:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Compose Modal */
.compose-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.compose-modal-content {
    background: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.compose-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compose-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.btn-close:hover {
    color: #333;
}

#compose-form {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    padding: 12px 24px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .vsl-email-container {
        flex-direction: column;
    }
    
    .vsl-email-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .email-view-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .compose-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

