/* styles_email_bulk_preview.css */

/* Bulk Email Preview Styles */
.bulk-email-preview {
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.bulk-summary {
    background: rgba(20, 22, 28, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(114, 216, 239, 0.2);
}

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

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

/* Email Carousel Wrapper */
.email-carousel-wrapper {
    background: #23252C;
    border: 1px solid rgba(114, 216, 239, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(20, 22, 28, 0.8);
    border-bottom: 1px solid rgba(114, 216, 239, 0.2);
}

.carousel-header h4 {
    margin: 0;
    color: #72D8EF;
    font-size: 16px;
    font-weight: 600;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    background: #72D8EF;
    border: none;
    color: #14161C;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
}

.nav-btn:hover:not(:disabled) {
    background: #5ab0bf;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(114, 216, 239, 0.4);
}

.nav-btn:disabled {
    background: #444;
    color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

.slide-indicator {
    color: #888;
    font-size: 14px;
    min-width: 50px;
    text-align: center;
    font-weight: 500;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    min-height: 350px;
    padding: 20px;
    background: rgba(20, 22, 28, 0.5);
}

.carousel-item {
    display: none;
    animation: slideIn 0.3s ease;
}

.carousel-item.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Email Preview Content */
.email-preview-content {
    background: rgba(35, 37, 44, 0.5);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(114, 216, 239, 0.1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(114, 216, 239, 0.2);
}

.preview-number {
    color: #888;
    font-size: 13px;
    font-weight: 500;
}

.recipient-email {
    color: #72D8EF;
    font-weight: 600;
    font-size: 15px;
}

.preview-field {
    margin-bottom: 12px;
}

.preview-field strong {
    color: #72D8EF;
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-body-container {
    margin-top: 15px;
}

.bulk-email-preview .email-body-preview {
    background: rgba(20, 22, 28, 0.8);
    padding: 15px;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #F4F4F4;
    font-size: 14px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.bulk-email-preview .email-body-preview:hover {
    border-color: rgba(114, 216, 239, 0.3);
    background: rgba(20, 22, 28, 0.9);
}

/* Action Buttons */
.bulk-email-preview .draft-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-send-all {
    background: #28a745 !important;
    font-size: 16px;
    padding: 12px 30px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-send-all::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-send-all:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.btn-send-all:hover:not(:disabled) {
    background: #218838 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Recipients Details */
.recipients-details {
    margin-top: 15px;
}

.recipients-details summary {
    cursor: pointer;
    color: #72D8EF;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.recipients-details summary:hover {
    color: #5ab0bf;
}

.recipients-details summary::-webkit-details-marker {
    color: #72D8EF;
}

.all-recipients {
    background: rgba(20, 22, 28, 0.8);
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.8;
    color: #ccc;
    border: 1px solid rgba(114, 216, 239, 0.2);
}

/* Attachment List in Preview */
.attachment-list {
    background: rgba(20, 22, 28, 0.6);
    padding: 10px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.8;
    color: #ccc;
    border: 1px solid rgba(114, 216, 239, 0.1);
}

/* Edit Mode Indicator */
.edit-mode-indicator {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid #FF9800;
    color: #FF9800;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Success Animation */
.bulk-email-preview .success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 30px;
    color: #4CAF50;
    text-align: center;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bulk-email-preview .success-message h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

/* Scrollbar Styling */
.bulk-email-preview .email-body-preview::-webkit-scrollbar,
.all-recipients::-webkit-scrollbar {
    width: 6px;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .bulk-email-preview {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .carousel-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .carousel-container {
        padding: 15px;
        min-height: 300px;
    }
    
    .email-preview-content {
        padding: 15px;
    }
    
    .bulk-email-preview .draft-actions {
        flex-direction: column;
    }
    
    .bulk-email-preview .draft-actions button {
        width: 100%;
    }
    
    .btn-send-all {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Loading State */
.bulk-email-preview button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.bulk-email-preview button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Additional Enhancements */
.draft-field.error {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
}

.preview-loading {
    text-align: center;
    padding: 50px;
    color: #888;
}

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

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


/* Add this to your styles_emailer.css or create a new file */

/* Enhanced Sent Email Links Styling */
.sent-emails-results {
    margin-top: 20px;
    animation: slideIn 0.3s ease;
}

.success-summary {
    background: rgba(76, 175, 80, 0.15);
    border-left: 4px solid #4CAF50;
    color: #4CAF50;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.sent-email-links .email-link-item {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.sent-email-links .email-link-item.clickable:hover {
    background: rgba(114, 216, 239, 0.15);
    transform: translateX(5px);
}

.email-link-item .email-actions {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.email-link-item:hover .email-actions {
    opacity: 1;
}

.view-email-btn {
    color: #72D8EF;
    font-weight: 600;
    font-size: 14px;
}

/* View All Button */
.view-all-sent {
    margin-top: 15px;
    text-align: center;
}

.view-sent-folder-btn {
    background: rgba(114, 216, 239, 0.1);
    border: 1px solid #72D8EF;
    color: #72D8EF;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-sent-folder-btn:hover {
    background: #72D8EF;
    color: #14161C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(114, 216, 239, 0.3);
}

/* Enhanced Success Message */
.success-message.enhanced {
    padding: 30px;
    text-align: center;
}

.success-header {
    margin-bottom: 25px;
}

.success-header h3 {
    color: #4CAF50;
    font-size: 24px;
    margin-bottom: 10px;
}

.success-details {
    color: #ccc;
    font-size: 16px;
}

.success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.success-actions button {
    min-width: 150px;
}

.sent-recipients {
    background: rgba(20, 22, 28, 0.5);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
}

.sent-recipients h4 {
    color: #72D8EF;
    margin-bottom: 10px;
    font-size: 16px;
}

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

.recipient-list li {
    padding: 5px 0;
    color: #ccc;
    font-size: 14px;
    position: relative;
    padding-left: 20px;
}

.recipient-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4CAF50;
}

/* Success State for Preview */
.email-draft-preview.success-state {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
}

/* Clickable Email Item Indicator */
.email-link-item.clickable .email-snippet {
    font-size: 12px;
    color: #888;
}

.email-link-item.clickable:hover .email-snippet {
    color: #72D8EF;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions button {
        width: 100%;
    }
    
    .email-link-item .email-actions {
        opacity: 1;
        position: static;
        transform: none;
        margin-top: 8px;
    }
    
    .view-email-btn {
        display: inline-block;
        background: rgba(114, 216, 239, 0.1);
        padding: 4px 12px;
        border-radius: 4px;
    }
}

/* Animation for new content */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for email links */
.email-links-loading {
    text-align: center;
    padding: 20px;
    color: #888;
}

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

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