/**
 * ProofPoints Image Manager - Frontend Styles (Fixed)
 * Styles for image generation, upload, and gallery interfaces
 */

/* ==========================================================================
   Modal Action Buttons (Images Tab Only)
   ========================================================================== */

.ppim-images-only {
    display: none !important; /* Hidden by default */
}

.details-tab-btn[data-tab="images-tab"].active ~ * .ppim-images-only,
#images-tab.active ~ * .ppim-images-only,
body[data-active-tab="images-tab"] .ppim-images-only {
    display: inline-block !important; /* Show only when images tab is active */
}

/* ==========================================================================
   Base Components
   ========================================================================== */

/* Buttons */
.ppim-button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-family: 'Lexend Deca', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.ppim-button:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

.ppim-button:active {
    transform: translateY(0);
}

.ppim-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Types */
.ppim-button-primary {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    box-shadow: none;
}

.ppim-button-secondary {
    background: #F5F5F5;
    color: #666;
    box-shadow: none;
}

.ppim-button-danger {
    background: #f44336;
    color: white;
    box-shadow: none;
}

/* Button Sizes */
.ppim-button-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 20px;
}

.ppim-button-large {
    padding: 12px 28px;
    font-size: 16px;
    border-radius: 30px;
}

/* ==========================================================================
   Generate Modal Input Focus Styles - Orange theme
   ========================================================================== */

#proofpoints-prompt-dialog textarea:focus,
#proofpoints-prompt-dialog input:focus {
    outline: none !important;
    border-color: #FF9800 !important;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15) !important;
}

#proofpoints-prompt-dialog textarea,
#proofpoints-prompt-dialog input {
    outline: none;
}

/* ==========================================================================
   Upload Dialog Styles - FIXED TRANSPARENT BACKGROUND
   ========================================================================== */

#image-upload-dialog,
#avatar-upload-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent !important;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* Target ALL upload dialog content variations */
.image-upload-dialog-content,
.avatar-upload-dialog-content,
.story-upload-dialog-content,
#image-upload-dialog > div,
#avatar-upload-dialog > div {
    background-color: white !important;
    border-radius: 16px;
    padding: 30px;
    width: 520px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideInUp 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #2196F3 !important; /* Blue keyline for upload */
}

.image-upload-dialog-title {
    margin-top: 0;
    font-family: 'Lexend Deca', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.image-upload-dialog-desc {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.image-upload-legal-notice,
.avatar-upload-legal-notice {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    padding: 12px 15px;
    background-color: #FFF3CD;
    border-radius: 8px;
    border-left: 4px solid #FFB900;
    line-height: 1.4;
}

.image-upload-legal-notice strong,
.avatar-upload-legal-notice strong {
    font-weight: 600;
    color: #E65100;
}

.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.image-upload-area * {
    pointer-events: none;
}

.image-upload-area:hover {
    background-color: rgba(33, 150, 243, 0.05);
    border-color: #2196F3;
}

.image-upload-area.dragover {
    background-color: rgba(33, 150, 243, 0.1);
    border-color: #2196F3;
    transform: scale(1.02);
}

.image-upload-icon {
    font-size: 48px;
    color: #999;
    margin-bottom: 15px;
}

.image-upload-icon svg {
    width: 48px;
    height: 48px;
}

.image-upload-text {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
}

.image-upload-info {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 13px;
    color: #999;
}

.image-upload-preview-container {
    text-align: center;
    margin: 20px 0;
}

.image-upload-preview {
    max-width: 100%;
    max-height: 200px;
    margin: 10px auto;
    border-radius: 8px;
}

.image-upload-preview-name {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.image-upload-progress {
    height: 6px;
    border-radius: 3px;
    background-color: #f0f0f0;
    margin: 20px 0;
    overflow: hidden;
}

.image-upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #1976D2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.image-upload-error {
    color: #f44336;
    font-family: 'Lexend Deca', sans-serif;
    font-size: 14px;
    margin-top: 15px;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
    border-left: 4px solid #f44336;
}

.image-upload-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.image-upload-dialog-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-family: 'Lexend Deca', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-upload-dialog-btn.cancel {
    background: #e0e0e0;
    color: #333;
}

.image-upload-dialog-btn.cancel:hover {
    background: #d0d0d0;
    transform: translateY(-1px);
}

.image-upload-dialog-btn.upload {
    background: #2196F3;
    color: white;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.image-upload-dialog-btn.upload:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

.image-upload-dialog-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================================================
   Delete Confirmation Dialog
   ========================================================================== */

.delete-confirmation-dialog,
.avatar-delete-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.delete-confirmation-content,
.avatar-delete-content {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s ease;
}

.delete-confirmation-title {
    margin-top: 0;
    font-family: 'Lexend Deca', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.delete-confirmation-message {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.delete-confirmation-message strong {
    color: #f44336;
    display: block;
    margin-top: 10px;
}

.delete-confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.delete-confirmation-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-family: 'Lexend Deca', sans-serif;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-confirmation-btn.cancel {
    background: #e0e0e0;
    color: #333;
}

.delete-confirmation-btn.cancel:hover {
    background: #d0d0d0;
    transform: translateY(-1px);
}

.delete-confirmation-btn.delete {
    background: #f44336;
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.delete-confirmation-btn.delete:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
}

/* ==========================================================================
   Image Delete Buttons
   ========================================================================== */

.image-delete-btn,
.avatar-image-delete-btn {
    position: absolute !important;
    bottom: 13px !important;
    left: 13px !important;
    width: 32px !important;
    height: 32px !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    opacity: 0 !important;
    transition: all 0.2s ease !important;
    backdrop-filter: blur(4px);
}

.image-item:hover .image-delete-btn,
.featured-image-wrapper:hover .avatar-image-delete-btn,
.image-delete-btn:hover,
.avatar-image-delete-btn:hover {
    opacity: 1 !important;
}

.image-delete-btn:hover,
.avatar-image-delete-btn:hover {
    background-color: rgba(244, 67, 54, 0.9) !important;
    transform: scale(1.1);
}

.image-delete-btn svg,
.avatar-image-delete-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* ==========================================================================
   Image Select Button
   ========================================================================== */

.image-select-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 36px !important;
    height: 36px !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #666 !important;
    border: 2px solid #ddd !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    opacity: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-item:hover .image-select-btn {
    opacity: 1 !important;
}

.image-select-btn:hover {
    background-color: #FF9800 !important;
    color: white !important;
    border-color: #FF9800 !important;
    transform: scale(1.1);
}

.image-item.selected .image-select-btn {
    background-color: #FF9800 !important;
    color: white !important;
    border-color: #FF9800 !important;
    opacity: 1 !important;
}

/* ==========================================================================
   Image Modal Styles
   ========================================================================== */

.ppim-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.ppim-image-modal-content {
    background: white;
    border-radius: 12px;
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    animation: slideInUp 0.3s ease;
    position: relative;
    z-index: 999999999;
}

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

.ppim-image-modal-title {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.ppim-image-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.ppim-image-modal-close:hover {
    color: #333;
}

.ppim-image-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    min-height: 400px;
}

.ppim-image-modal-body img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 4px;
}

.ppim-image-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ppim-image-modal-info {
    font-family: 'Lexend Deca', sans-serif;
    font-size: 13px;
    color: #666;
}

.ppim-image-modal-actions {
    display: flex;
    gap: 10px;
}

.ppim-image-modal-btn {
    padding: 0 20px;
    border: none;
    border-radius: 6px;
    font-family: 'Lexend Deca', sans-serif;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 35px;
    line-height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ppim-image-modal-btn.primary {
    background: #FF9800;
    color: white;
}

.ppim-image-modal-btn.primary:hover {
    background: #F57C00;
}

/* Download button - outline style */
.ppim-image-modal-btn.outline {
    background: transparent;
    color: #666;
    border: 1px solid #999;
}

.ppim-image-modal-btn.outline:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #666;
    color: #333;
}

/* Close button - dark style */
.ppim-image-modal-btn.dark {
    background: #333;
    color: white;
}

.ppim-image-modal-btn.dark:hover {
    background: #444;
}

/* Legacy secondary style - keep for backwards compatibility */
.ppim-image-modal-btn.secondary {
    background: #e0e0e0;
    color: #333;
}

.ppim-image-modal-btn.secondary:hover {
    background: #d0d0d0;
}

/* ==========================================================================
   Avatar Tool Specific Styles - REMOVED
   All avatar tool styling is now handled by the Avatar Tool plugin itself
   ========================================================================== */

/* Fix button styles in footer - ONLY for avatar tool pages */
/* REMOVED: Avatar tool now uses same button styles as Story Studio */

/* Avatar Tool footer button alignment - REMOVED to let avatar tool handle its own styling */

/* Workflow button alignment - REMOVED to let avatar tool handle its own styling */

/* Specific fixes for known buttons - REMOVED to let avatar tool handle its own styling */

/* Override conflicting styles - REMOVED to let avatar tool handle its own styling */

/* Consistent spacing - REMOVED to let avatar tool handle its own styling */

/* Continue button fix - REMOVED to let avatar tool handle its own styling */

/* Back button fix - REMOVED to let avatar tool handle its own styling */

/* Featured image wrapper and thumbnail styles - REMOVED to let avatar tool handle its own styling */
/* These styles are now handled by the Avatar Tool plugin */

/* ==========================================================================
   PPIM Image Grid - Clean CSS Grid Implementation
   FIXED v2: Using padding-bottom trick for bulletproof 16:9 aspect ratio
   ========================================================================== */

/* Grid container - 3 columns default */
.ppim-image-grid,
#unified-details-modal #images-container,
#images-tab #images-container,
#images-tab.active #images-container,
.details-tab-content #images-container,
#unified-details-modal #images-tab #images-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: auto !important;
    gap: 20px !important;
    padding: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: start !important;
}

/* 4 columns on screens wider than 1920px */
@media (min-width: 1921px) {
    .ppim-image-grid,
    #unified-details-modal #images-container,
    #images-tab #images-container,
    .details-tab-content #images-container {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* 2 columns on larger tablets */
@media (max-width: 1024px) {
    .ppim-image-grid,
    #unified-details-modal #images-container,
    #images-tab #images-container,
    .details-tab-content #images-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 1 column on mobile and small tablets - UPDATED from 600px to 768px */
@media (max-width: 768px) {
    .ppim-image-grid,
    #unified-details-modal #images-container,
    #images-tab #images-container,
    #images-tab.active #images-container,
    .details-tab-content #images-container,
    #unified-details-modal #images-tab #images-container {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 16px !important;
    }
    
    /* Ensure image items take full width on mobile */
    .ppim-grid-item,
    .ppim-image-grid .image-item,
    #unified-details-modal .image-item,
    #unified-details-modal #images-container .image-item,
    #unified-details-modal #images-tab .image-item,
    #images-tab .image-item,
    #images-tab #images-container .image-item,
    .details-tab-content .image-item,
    .details-tab-content #images-container .image-item {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Grid items - 16:9 using padding-bottom trick (56.25% = 9/16) */
.ppim-grid-item,
.ppim-image-grid .image-item,
#unified-details-modal .image-item,
#unified-details-modal #images-container .image-item,
#unified-details-modal #images-tab .image-item,
#images-tab .image-item,
#images-tab #images-container .image-item,
.details-tab-content .image-item,
.details-tab-content #images-container .image-item {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    overflow: hidden !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    border: 3px solid transparent !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    background: #f0f0f0 !important; /* Placeholder color while loading */
}

.ppim-grid-item:hover,
.ppim-image-grid .image-item:hover,
#unified-details-modal .image-item:hover,
#unified-details-modal #images-container .image-item:hover,
#images-tab .image-item:hover,
#images-tab #images-container .image-item:hover,
.details-tab-content .image-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.ppim-grid-item.selected,
.ppim-image-grid .image-item.selected,
#unified-details-modal .image-item.selected,
#unified-details-modal #images-container .image-item.selected,
#images-tab .image-item.selected,
#images-tab #images-container .image-item.selected,
.details-tab-content .image-item.selected {
    border-color: #FF9800 !important;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.3) !important;
}

/* Images fill their container with absolute positioning */
.ppim-grid-item img,
.ppim-image-grid .image-item img,
#unified-details-modal .image-item img,
#unified-details-modal #images-container .image-item img,
#unified-details-modal #images-tab .image-item img,
#images-tab .image-item img,
#images-tab #images-container .image-item img,
.details-tab-content .image-item img,
.details-tab-content #images-container .image-item img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* ==========================================================================
   Avatar Tool Image Grid
   NOTE: Avatar Tool has its own CSS in main.css
   These are just fallback styles in case Avatar Tool CSS doesn't load
   ========================================================================== */

/* Fallback only - Avatar Tool CSS should take precedence */

/* Image expand cursor */
.ppim-expandable-image {
    cursor: zoom-in !important;
}

/* ==========================================================================
   Notifications
   ========================================================================== */

.ppim-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Lexend Deca', sans-serif;
    font-size: 14px;
    z-index: 999999;
    max-width: 350px;
    animation: slideInRight 0.3s ease;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.ppim-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #FF9800;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

/* Hide old small generate modal if it appears */
.smallmodal.generate-image-modal,
#generate-image-modal,
.modal#generate-image-modal,
[data-modal="generate-image-modal"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================================
   PPIM Unified Progress Modal - Orange Theme
   Beautiful staged progress modal for image generation
   ========================================================================== */

.ppim-progress-modal {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99999999 !important;
    align-items: center;
    justify-content: center;
}

.ppim-progress-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.ppim-progress-modal .modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    z-index: 1;
    animation: ppimFadeIn 0.15s ease-out;
}

@keyframes ppimFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ppim-progress-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.ppim-progress-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    color: #333;
}

.ppim-progress-modal .modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #FF9800;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppim-progress-modal .modal-close:hover {
    background: rgba(255, 152, 0, 0.2);
    border-color: rgba(255, 152, 0, 0.5);
    transform: scale(1.05);
}

.ppim-progress-modal .modal-body {
    padding: 24px;
}

.ppim-progress-modal .progress-stages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.ppim-progress-modal .progress-stage {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f9f9f9;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.ppim-progress-modal .progress-stage.active {
    opacity: 1;
    background: #FFF8E1;
    border: 1px solid #FFB74D;
}

.ppim-progress-modal .progress-stage.completed {
    opacity: 0.7;
    background: #FFF8E1;
    border: 1px solid #FFE0B2;
}

.ppim-progress-modal .stage-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Lexend Deca', sans-serif;
    flex-shrink: 0;
}

.ppim-progress-modal .progress-stage.active .stage-icon {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.ppim-progress-modal .progress-stage.completed .stage-icon {
    background: #FFB74D;
    color: white;
}

.ppim-progress-modal .stage-content {
    flex: 1;
}

.ppim-progress-modal .stage-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: 'Lexend Deca', sans-serif;
    margin-bottom: 2px;
}

.ppim-progress-modal .stage-text {
    font-size: 12px;
    color: #888;
    font-family: 'Lexend Deca', sans-serif;
}

.ppim-progress-modal .progress-bar-container {
    margin-top: 20px;
}

.ppim-progress-modal .progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.ppim-progress-modal .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF9800, #F57C00);
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 3px;
}

.ppim-progress-modal .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
}

.ppim-progress-modal .cancel-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ppim-progress-modal .cancel-btn:hover {
    background: #e8e8e8;
}

.ppim-progress-modal .close-btn {
    padding: 10px 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Lexend Deca', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ppim-progress-modal .close-btn:hover {
    background: #444;
}

.ppim-progress-modal .progress-note {
    font-size: 12px;
    color: #999;
    font-family: 'Lexend Deca', sans-serif;
    font-style: italic;
    text-align: center;
    margin-top: 16px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .image-upload-dialog-content,
    .avatar-upload-dialog-content {
        width: 95%;
        padding: 20px;
    }
    
    .delete-confirmation-content,
    .avatar-delete-content {
        width: 95%;
        padding: 20px;
    }
    
    .ppim-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .ppim-image-modal-close {
        top: 10px;
        right: 10px;
        font-size: 20px;
    }
    
    .ppim-image-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .ppim-image-modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .ppim-image-modal-info {
        text-align: center;
        margin-bottom: 10px;
    }
}

/**
 * ProofPoints Image Manager - Button Alignment Fix
 * Match image buttons to Close button styling
 * - Same font weight as Close button
 * - Proper vertical text alignment
 * - 33px height to match Close button
 */

/* ==========================================================================
   FOOTER BUTTONS - MATCH CLOSE BUTTON STYLING
   ========================================================================== */

/* Upload button - match Close button weight and alignment */
#upload-image-btn,
#footer-upload-btn {
    padding: 7px 20px !important;
    background: #2196F3 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important; /* Match Close button weight - was 500 */
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 120px !important;
    height: 33px !important;
    line-height: 19px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}


#upload-image-btn:hover,
#footer-upload-btn:hover {
    background: #1976D2 !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

/* Generate button - match Close button weight and alignment */
#generate-image-btn,
#footer-generate-btn {
    padding: 7px 20px !important;
    background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important; /* Match Close button weight - was 500 */
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 140px !important;
    height: 33px !important;
    line-height: 19px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

#generate-image-btn:hover,
#footer-generate-btn:hover {
    background: linear-gradient(135deg, #F57C00, #E65100) !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   AVATAR TOOL FOOTER BUTTONS - MATCH CLOSE BUTTON
   ========================================================================== */

.avatar-upload-btn {
    padding: 7px 20px !important;
    background: #2196F3 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important; /* Match Close button */
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 120px !important;
    height: 33px !important;
    line-height: 19px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.avatar-upload-btn:hover {
    background: #1976D2 !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

.avatar-generate-btn {
    padding: 7px 20px !important;
    background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important; /* Match Close button */
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    min-width: 140px !important;
    height: 33px !important;
    line-height: 19px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.avatar-generate-btn:hover {
    background: linear-gradient(135deg, #F57C00, #E65100) !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

/* ==========================================================================
   MODAL BUTTONS (Keep at 40px with proper alignment)
   ========================================================================== */

#proofpoints-prompt-dialog button {
    padding: 10px 24px !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important; /* Consistent weight */
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    min-width: 90px !important;
    height: 40px !important;
    line-height: 20px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#proofpoints-prompt-dialog button:first-of-type {
    background: #e0e0e0 !important;
    color: #333 !important;
}

#proofpoints-prompt-dialog button:first-of-type:hover {
    background: #d0d0d0 !important;
    transform: translateY(-1px) !important;
}

#proofpoints-generate-btn {
    background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    color: white !important;
    box-shadow: none !important;
    min-width: 150px !important;
    padding: 10px 24px !important;
    height: 40px !important;
    line-height: 20px !important;
    border-radius: 6px !important;
    font-weight: 400 !important;
}

#proofpoints-generate-btn:hover {
    background: linear-gradient(135deg, #F57C00, #E65100) !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

/* Upload modal buttons */
.image-upload-dialog-btn.cancel,
.avatar-upload-dialog-btn.cancel {
    padding: 0 16px !important;
    background: #f5f5f5 !important;
    color: #666 !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    height: 35px !important;
    line-height: 35px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.image-upload-dialog-btn.cancel:hover,
.avatar-upload-dialog-btn.cancel:hover {
    background: #e8e8e8 !important;
}

.image-upload-dialog-btn.upload,
.avatar-upload-dialog-btn.upload {
    padding: 0 20px !important;
    background: #2196F3 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    height: 35px !important;
    line-height: 35px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.image-upload-dialog-btn.upload:hover,
.avatar-upload-dialog-btn.upload:hover {
    background: #1976D2 !important;
    box-shadow: none !important;
}

.image-upload-dialog-btn.upload:disabled,
.avatar-upload-dialog-btn.upload:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Close button - dark style */
.image-upload-dialog-btn.close-btn,
.avatar-upload-dialog-btn.close-btn {
    padding: 0 20px !important;
    background: #333 !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    font-family: 'Lexend Deca', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    height: 35px !important;
    line-height: 35px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.image-upload-dialog-btn.close-btn:hover,
.avatar-upload-dialog-btn.close-btn:hover {
    background: #444 !important;
}

/* Button containers */
.image-upload-dialog-buttons,
.avatar-upload-dialog-buttons {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 25px !important;
}

/* ==========================================================================
   KEY CHANGES SUMMARY
   ========================================================================== */

/*
 * WHAT CHANGED:
 * 
 * 1. Font weight: 500 → 400 (matches Close button)
 * 2. Height: 35px → 33px (matches Close button exactly)
 * 3. Padding: 8px 20px → 7px 20px (adjusted for 33px height)
 * 4. Line-height: Adjusted for proper vertical centering
 * 5. Added display: inline-flex + align-items: center (ensures perfect centering)
 * 6. Added vertical-align: middle (ensures button baseline alignment)
 * 
 * These changes ensure the text sits at exactly the same height as the Close button.
 */

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Laptop/medium screens (1400px and below) */
@media (max-width: 1400px) {
    #upload-image-btn,
    #footer-upload-btn,
    #generate-image-btn,
    #footer-generate-btn,
    .avatar-upload-btn,
    .avatar-generate-btn {
        min-width: 110px !important;
        padding: 6px 16px !important;
        font-size: 13px !important;
        height: 34px !important;
        max-height: 36px !important;
    }
}

/* Small laptops (1280px and below) */
@media (max-width: 1280px) {
    #upload-image-btn,
    #footer-upload-btn,
    #generate-image-btn,
    #footer-generate-btn,
    .avatar-upload-btn,
    .avatar-generate-btn {
        min-width: 100px !important;
        padding: 5px 14px !important;
        font-size: 12px !important;
        height: 32px !important;
        max-height: 34px !important;
    }
}

@media (max-width: 768px) {
    #proofpoints-prompt-dialog button,
    #proofpoints-generate-btn,
    .image-upload-dialog-btn,
    .avatar-upload-dialog-btn {
        min-width: 80px !important;
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    #upload-image-btn,
    #footer-upload-btn,
    #generate-image-btn,
    #footer-generate-btn,
    .avatar-upload-btn,
    .avatar-generate-btn {
        min-width: 100px !important;
        padding: 7px 16px !important;
        font-size: 13px !important;
    }
}