/* Email Search Results Styling */
.email-search-results {
    margin: 10px 0;
}

.search-summary {
    font-weight: 600;
    margin-bottom: 15px;
    color: #72D8EF;
    padding: 8px 12px;
    background: rgba(114, 216, 239, 0.1);
    border-radius: 6px;
    border-left: 3px solid #72D8EF;
}

.email-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-link-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(20, 22, 28, 0.5);
    border: 1px solid rgba(114, 216, 239, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.email-link-item:hover {
    background: rgba(114, 216, 239, 0.1);
    border-color: #72D8EF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(114, 216, 239, 0.2);
}

.email-link-item.unread {
    border-left: 3px solid #72D8EF;
    background: rgba(114, 216, 239, 0.05);
}

.email-link-item.analyzed {
    border-left: 3px solid #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

.email-icon {
    font-size: 18px;
    margin-right: 12px;
    position: relative;
    min-width: 30px;
}

.attachment-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 10px;
    background: #72D8EF;
    color: #14161C;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unread-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    color: #72D8EF;
    font-size: 12px;
}

.analyzed-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

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

.email-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.email-sender {
    font-weight: 600;
    color: #F4F4F4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.email-date {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

.email-subject {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #F4F4F4;
}

.email-snippet {
    font-size: 12px;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analyzed-badge {
    font-size: 10px;
    color: #4CAF50;
    font-weight: 500;
    margin-top: 2px;
}

.email-actions {
    margin-left: 12px;
}

.view-email-btn {
    background: rgba(114, 216, 239, 0.1);
    color: #72D8EF;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid rgba(114, 216, 239, 0.3);
    transition: all 0.3s ease;
}

.email-link-item:hover .view-email-btn {
    background: #72D8EF;
    color: #14161C;
}

.show-more-emails {
    padding: 12px;
    text-align: center;
    background: rgba(114, 216, 239, 0.05);
    border: 1px dashed rgba(114, 216, 239, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #72D8EF;
    font-size: 14px;
}

.show-more-emails:hover {
    background: rgba(114, 216, 239, 0.1);
    border-color: #72D8EF;
}

.email-links-message {
    max-width: 95% !important;
}


/* Add to styles_emailer.css */

.email-icons-container {
    margin: 15px 0;
    padding: 15px;
    background: rgba(20, 22, 28, 0.5);
    border-radius: 8px;
}

.email-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.email-icon-item {
    background: rgba(35, 37, 44, 0.8);
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.email-icon-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 216, 239, 0.2);
}

.email-icon-item.failed {
    opacity: 0.7;
    border-left-color: #f44336 !important;
}

.email-icon-item.partial {
    border-left-color: #ff9800 !important;
}

.email-icon-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.operation-icon {
    font-size: 20px;
}

.operation-label {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge {
    margin-left: auto;
    font-size: 14px;
}

.email-icon-content {
    font-size: 12px;
}

.email-subject {
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-parties {
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    background: rgba(114, 216, 239, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
}
/* Responsive design for email links */
@media (max-width: 768px) {
    .email-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .email-sender {
        max-width: 100%;
    }
    
    .email-actions {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .email-link-item {
        padding: 10px;
    }
    
    .search-summary {
        font-size: 14px;
        padding: 6px 10px;
    }
}



/* Add to styles.css or create styles_email_confirmation.css */
.attachment-list {
    margin-top: 8px;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.8;
    color: #ccc;
}

.attachment-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.attachment-icon {
    font-size: 16px;
}

/* Add to styles.css or create styles_email_confirmation.css */

.email-draft-preview {
    background: linear-gradient(135deg, #2a2d35 0%, #23252C 100%);
    border: 1px solid rgba(114, 216, 239, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.email-draft-preview h3 {
    color: #72D8EF;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.draft-details {
    background: rgba(20, 22, 28, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.draft-field {
    margin-bottom: 12px;
    color: #F4F4F4;
    font-size: 14px;
}

.draft-field strong {
    color: #72D8EF;
    margin-right: 8px;
    display: inline-block;
    min-width: 100px;
}

.email-body-preview {
    margin-top: 8px;
    padding: 12px;
    background: rgba(20, 22, 28, 0.8);
    border-radius: 6px;
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.email-body-preview:focus {
    outline: none;
    border-color: #72D8EF;
    background: rgba(20, 22, 28, 1);
}

.draft-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.draft-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #72D8EF 0%, #5ab0bf 100%);
    color: #14161C;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 216, 239, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(114, 216, 239, 0.2);
    color: #72D8EF;
    border: 1px solid #72D8EF;
}

.btn-secondary:hover {
    background: rgba(114, 216, 239, 0.3);
}

.btn-danger {
    background: rgba(255, 82, 82, 0.2);
    color: #ff5252;
    border: 1px solid #ff5252;
}

.btn-danger:hover {
    background: rgba(255, 82, 82, 0.3);
}

.draft-info {
    text-align: center;
    margin-top: 10px;
}

.email-count-info {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

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

.email-body-preview::-webkit-scrollbar-track {
    background: rgba(20, 22, 28, 0.5);
    border-radius: 3px;
}

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

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

/* Success message styling */
.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 15px;
    color: #4CAF50;
    text-align: center;
    font-weight: 600;
    margin: 15px 0;
}

/* Email confirmation toggle (optional) */
.email-confirm-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

.email-confirm-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.email-confirm-toggle label {
    font-size: 13px;
    color: #888;
    cursor: pointer;
}

.email-confirm-toggle label:hover {
    color: #72D8EF;
}