/**
 * ProofPoints Story Modal - Download Styles
 * Exact copy from proofpoints-client-story-download v1.0.3
 */

/* Import Lexend Deca font */
@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:wght@300;400;500;600&display=swap');

/* Download Button Container */
.download-button-container {
    position: relative;
    display: inline-flex;
    margin-right: 10px;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

/* Main download button */
.download-main-btn {
    background-color: transparent;
    color: #8b8680;
    border: 1px solid #8b8680;
    padding: 8px 16px;
    border-radius: 4px 0 0 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    height: 34px;
    box-sizing: border-box;
}

.download-main-btn:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
}

.download-main-btn svg {
    stroke: #8b8680;
}

/* Dropdown toggle button */
.download-dropdown-btn {
    background-color: transparent;
    color: #8b8680;
    border: 1px solid #8b8680;
    border-left: 1px solid #8b8680;
    padding: 8px 10px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    height: 34px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-dropdown-btn:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
}

.download-dropdown-btn svg {
    stroke: #8b8680;
}

/* Dropdown Menu */
.download-dropdown-menu {
    display: none;
    position: fixed;
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    z-index: 2147483647 !important;
    min-width: 320px;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    overflow: hidden;
}

.download-option {
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.download-option:last-child {
    border-bottom: none;
}

.download-option:hover {
    background-color: #f8f9ff;
    padding-left: 24px;
}

.download-option-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.download-option-desc {
    font-size: 12px;
    color: #666;
    font-weight: 300;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

/* Version badges */
.version-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 8px;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.version-badge.live {
    background-color: #C0E600;
    color: #333;
}

.version-badge.modified {
    background-color: #ff9800;
    color: white;
}

/* Preview Modal - created dynamically via JS */
.download-preview-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
}

.download-preview-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    position: relative;
    z-index: 2147483647;
}

.download-preview-content h3 {
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 20px 0;
    color: #333;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.download-icon {
    width: 16px;
    height: 16px;
}

/* Modal buttons - match story modal footer styling */
.modal-close-btn {
    padding: 8px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

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

.download-all-btn {
    padding: 8px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.download-all-btn:hover {
    background: #43a047;
}

.download-single-btn {
    padding: 6px 16px;
    background: #8b8680;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.download-single-btn:hover {
    background: #6d6a67;
}

/* Version items in preview modal */
.version-item {
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.version-item:hover {
    border-color: #8b9dc3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139,157,195,0.15);
    background: #f8f9ff;
}

.version-item strong {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Spinner for loading state */
.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Version Comparison Table */
.version-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.version-comparison-table th,
.version-comparison-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.version-comparison-table th {
    background-color: #f5f5f5;
    font-weight: 500;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-comparison-table td {
    font-weight: 300;
}

.version-comparison-table td strong {
    font-weight: 400;
}

.version-row.live {
    background-color: #f0f9e0;
}

/* Transcript Modal Styles */
.transcript-preview-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
}

.transcript-preview-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.transcript-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transcript-item-card {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
}

.transcript-item-card:hover {
    border-color: #8b9dc3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139,157,195,0.15);
    background: #f8f9ff;
}

.transcript-item-card.selected {
    border-color: #4CAF50;
    background: #f0f9f0;
}

.transcript-item-checkbox {
    margin-right: 12px;
}

.transcript-item-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.transcript-item-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: flex;
    gap: 10px;
}

.transcript-language-badge {
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* Modal Actions */
.modal-actions {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.modal-action-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Lexend Deca', 'Century Gothic', sans-serif;
    transition: all 0.2s;
}

/* Info Box */
.info-box {
    background: #f0f9ff;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 13px;
    color: #666;
    border-left: 3px solid #4a90d9;
}
