/* Exigone Production Manager - Clean Theme v2.1.0 - Responsive & Modern */

/* ============================================
   RESET & BASE
   ============================================ */
.exigone-production-wrapper,
.exigone-production-wrapper div,
.exigone-production-wrapper h1,
.exigone-production-wrapper h3,
.exigone-production-wrapper a,
.exigone-production-wrapper button,
.exigone-production-wrapper audio {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    box-sizing: border-box;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */
.exigone-production-wrapper {
    position: relative;
    max-width: 800px;
    margin: 30px auto;
    padding: 0;
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
    border-top: 4px solid #961c00;
    border-radius: 0;
}

/* Modern rounded corners on larger screens */
@media (min-width: 769px) {
    .exigone-production-wrapper {
        border-radius: 12px;
        overflow: hidden;
    }
}

/* ============================================
   HEADER SECTION WITH ACTION BUTTON
   ============================================ */
.exigone-production-button-wrapper {
    padding: 30px;
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 100;
}

/* ============================================
   PRODUCE BUTTON
   ============================================ */
.exigone-produce-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    vertical-align: middle;
    margin: 10px auto !important;
    padding: 14px 24px !important;
    min-width: 160px;
    min-height: 48px; /* Touch-friendly */
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    background: #961c00;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(150, 28, 0, 0.4);
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

.exigone-produce-button .button-icon {
    display: none;
}

.exigone-produce-button:hover:not(:disabled) {
    background: #b52200;
    box-shadow: 0 8px 25px rgba(150, 28, 0, 0.6);
    transform: translateY(-2px);
}

.exigone-produce-button:active:not(:disabled) {
    background: #7a1700;
}

.exigone-produce-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.exigone-produce-button.producing {
    background: #ff9800;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

/* ============================================
   STATUS MESSAGES
   ============================================ */
.exigone-completion,
.exigone-status,
.exigone-error {
    margin: 20px 30px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.exigone-completion {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #66bb6a;
}

.exigone-status {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.exigone-error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ef5350;
}

/* ============================================
   FILES SECTION
   ============================================ */
.exigone-files-section {
    padding: 40px !important;
    position: relative;
    z-index: 1;
}

.exigone-files-section h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   INTEGRATED AUDIO PLAYER
   ============================================ */
.exigone-audio-player-wrapper {
    margin: 20px 0;
    padding: 30px !important;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#exigone-audio-player,
#exigone-station2-audio-player,
#exigone-station2-france-audio-player,
#exigone-custom-audio-player {
    width: 100%;
    height: 50px;
    background: transparent;
}

/* Player artwork display */
.player-artwork {
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: block;
    border-radius: 12px;
}

#exigone-audio-player,
#exigone-station2-audio-player,
#exigone-station2-france-audio-player,
#exigone-inforadio-audio-player,
#exigone-australia128-audio-player,
#exigone-custom-audio-player {
    margin-top: 30px;
}

.player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.exigone-now-playing {
    margin-top: 12px;
    color: #aaa;
    font-size: 13px;
    text-align: center;
}

.exigone-now-playing strong {
    color: #fff;
    font-weight: 600;
}

/* ============================================
   MODERN FILE LIST
   ============================================ */
.exigone-files-list {
    margin: 20px 0;
}

.file-item {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    margin: 12px 25px 12px 0 !important;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.file-item:hover {
    background: #0a0a0a;
    border-color: #961c00;
    box-shadow: 0 4px 12px rgba(150, 28, 0, 0.2);
    transform: translateY(-2px);
}

/* Artwork Thumbnail */
.file-artwork {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    margin-left: auto;
    margin-right: auto;
}

.file-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* File Info */
.file-info {
    flex: 1 1 200px;
    min-width: 0;
}

.file-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #999;
}

.file-format {
    display: inline-block;
    padding: 4px 12px;
    background: #961c00;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Action Buttons */
.file-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.file-play,
.file-download {
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.file-play {
    padding: 12px 20px !important;
    background: #961c00;
    border: 1px solid #961c00;
    color: #fff;
    border-radius: 6px;
    min-height: 44px; /* Touch-friendly */
}

.file-download {
    padding: 12px 20px !important;
    background: rgba(150, 28, 0, 0.2);
    border: 1px solid #961c00;
    color: #fff;
    border-radius: 6px;
    min-height: 44px; /* Touch-friendly */
}

.file-play:hover {
    background: #b52200;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(150, 28, 0, 0.3);
}

.file-download:hover {
    background: #961c00;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(150, 28, 0, 0.3);
}

/* Refresh Button */
.exigone-refresh-button {
    display: block;
    margin: 20px auto 0 !important;
    padding: 12px 24px !important;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: fit-content !important;
    border-radius: 6px;
    min-height: 44px; /* Touch-friendly */
}

.exigone-refresh-button .refresh-icon {
    color: #961c00;
}

.exigone-refresh-button:hover {
    background: #0a0a0a;
    border-color: #961c00;
    transform: translateY(-1px);
}

/* Last Updated Timestamp */
.exigone-last-updated {
    text-align: center;
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

/* ============================================
   LOADING & EMPTY STATES
   ============================================ */
.loading,
.no-files {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 14px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

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

.producing .button-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .file-item {
        gap: 12px;
    }
    
    .file-meta {
        flex-wrap: wrap;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    .exigone-production-wrapper {
        margin: 10px;
        max-width: 100%;
        border-top-width: 3px;
    }
    
    .exigone-production-button-wrapper {
        padding: 20px 15px;
        gap: 8px;
    }
    
    .exigone-files-section {
        padding: 20px 15px !important;
    }
    
    .exigone-files-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .exigone-produce-button {
        width: 100%;
        max-width: 100%;
        padding: 14px 20px !important;
        font-size: 15px;
        min-width: auto;
    }
    
    .file-item {
        flex-direction: column;
        align-items: center;
        gap: 0 !important;
        padding: 12px !important;
        margin: 10px 0 !important;
        row-gap: 0 !important;
    }
    
    .file-item .file-artwork {
        margin-bottom: 10px !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .file-item .file-info {
        margin-bottom: 5px !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .file-item .file-actions {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .file-item > * {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
    }
    
    .file-artwork {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1;
        align-self: center;
        border-radius: 8px;
    }
    
    .file-artwork img {
        object-fit: contain;
    }
    
    .file-info {
        width: 100%;
        text-align: center;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        flex-basis: auto !important;
        height: auto !important;
    }
    
    .file-title {
        font-size: 15px;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center;
        line-height: 1.2;
    }
    
    .file-meta {
        flex-direction: column;
        align-items: center;
        gap: 2px;
        text-align: center;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .file-format {
        display: block;
        font-size: 11px;
        padding: 4px 12px;
        margin: 0 !important;
    }
    
    .file-actions {
        width: 100%;
        flex-direction: column;
        gap: 4px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .file-play,
    .file-download {
        width: 100%;
        justify-content: center;
        padding: 14px !important;
        font-size: 14px;
        min-height: 48px; /* Touch-friendly */
    }
    
    .exigone-audio-player-wrapper {
        padding: 20px 15px !important;
        margin: 15px 0;
    }
    
    .player-artwork {
        width: 200px;
        height: 200px;
        margin-bottom: 15px;
        aspect-ratio: 1;
    }
    
    .player-artwork img {
        object-fit: contain;
    }
    
    .exigone-completion,
    .exigone-status,
    .exigone-error {
        margin: 15px;
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .exigone-refresh-button {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 14px;
        min-height: 48px;
    }
}

/* Small Mobile (< 480px) - iPhone SE, small phones */
@media (max-width: 480px) {
    .exigone-production-wrapper {
        margin: 5px;
    }
    
    .exigone-production-button-wrapper,
    .exigone-files-section {
        padding: 15px 10px !important;
    }
    
    .exigone-produce-button {
        padding: 16px 20px !important;
        font-size: 14px;
    }
    
    .file-item {
        padding: 12px !important;
        margin: 8px 0 !important;
        gap: 0 !important;
        row-gap: 0 !important;
    }
    
    .file-item .file-artwork {
        margin-bottom: 10px !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .file-item .file-info {
        margin-bottom: 5px !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .file-item .file-actions {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .file-item > * {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
    }
    
    .file-artwork {
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    .file-info {
        margin-bottom: 5px !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex-basis: auto !important;
        height: auto !important;
    }
    
    .file-title {
        font-size: 14px;
        margin-bottom: 0;
        text-align: center;
    }
    
    .file-meta {
        font-size: 11px;
        gap: 4px;
        text-align: center;
    }
    
    .file-format {
        display: block;
        font-size: 10px;
        padding: 3px 10px;
        margin: 0 !important;
    }
    
    .file-actions {
        gap: 4px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .player-artwork {
        width: 180px;
        height: 180px;
        aspect-ratio: 1;
    }
    
    .exigone-audio-player-wrapper {
        padding: 15px 10px !important;
    }
    
    #exigone-audio-player,
    #exigone-station2-audio-player,
    #exigone-station2-france-audio-player,
    #exigone-custom-audio-player {
        height: 45px;
    }
    
    .exigone-now-playing {
        font-size: 12px;
    }
}

/* ============================================
   BUTTON ICON PLACEHOLDER
   ============================================ */
.button-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.exigone-production-wrapper *::selection {
    background: rgba(150, 28, 0, 0.3);
    color: #fff;
}
