/**
 * Mementor Text to Speech - Admin Columns CSS
 * 
 * This file contains styles for the admin columns in post lists.
 */

/* TTS column — no forced width, let WordPress handle table layout */

/* Column header styling */
th#mementor_tts,
.widefat tfoot tr th#mementor_tts {
    white-space: nowrap;
    padding: 10px;
    text-align: left;
}

th#mementor_tts img,
.widefat tfoot tr th#mementor_tts img {
    vertical-align: middle;
}

.mementor-tts-logoicon-text {
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
    font-size: 14px;
}

/* Column controls styling */
.mementor-tts-column-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.mementor-tts-column-controls a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-right: 2px;
    text-decoration: none;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
    line-height: 1;
    font-size: 12px;
    color: #1d2327;
}

.mementor-tts-column-controls a:hover {
    background-color: #f0f0f1;
}

.mementor-tts-column-controls a img {
    display: block;
    width: 18px;
    height: 18px;
}

/* Playing state — subtle pulse */
.mementor-tts-column-controls .mementor-tts-playing {
    background-color: #e8f4f8;
}
.mementor-tts-column-controls .mementor-tts-playing img {
    animation: mementor-tts-pulse 1s ease-in-out infinite;
}
@keyframes mementor-tts-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Spin animation for regeneration */
.mementor-tts-column-controls .mementor-tts-spin {
    animation: mementor-tts-spin 2s linear infinite;
}

@keyframes mementor-tts-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Modern tooltip */
.mementor-tts-tooltip {
    position: absolute;
    z-index: 999999;
    background: #1d2327;
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.mementor-tts-tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}
.mementor-tts-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1d2327;
}

.mementor-tts-column-controls .mementor-tts-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Dashicon size for the cancel button rendered during the processing state. */
.mementor-tts-column-controls .dashicons {
    font-size: 18px;
}

/* Status indicators */
.mementor-tts-processing,
.mementor-tts-not-published {
    color: #8c8f94;
    font-style: italic;
}

/* Multi-Language TTS Column Styles */
.mementor-tts-ml-container {
    display: inline-flex;
    flex-direction: column;
    gap: 0;
    text-align: center;
}

.mementor-tts-ml-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    justify-items: center;
    gap: 2px;
    padding: 3px 2px;
    background: #f9f9f9;
}

/* Ensure ml-row action icons render at the same 18×18 size as the
   single-language column, matching .mementor-tts-column-controls a img. */
.mementor-tts-ml-row a img {
    display: block;
    width: 18px;
    height: 18px;
}

.mementor-tts-ml-row:nth-child(even) {
    background: #f0f0f1;
}

/* Language label */
.mementor-tts-ml-row .mementor-tts-ml-lang {
    font-weight: 600;
    font-size: 12px;
    color: #50575e;
    width: 24px;
    text-align: center;
}

/* All slots same size */
.mementor-tts-ml-row a,
.mementor-tts-ml-row .mementor-tts-ml-slot {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Create icon for generate button */
.mementor-tts-create-icon,
.mementor-tts-play-icon {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px;
    max-height: 18px;
    vertical-align: middle;
}

/* Delete button styling for ML rows */
.mementor-tts-ml-row .mementor-tts-ml-delete-btn {
    color: #d63638;
}

.mementor-tts-ml-row .mementor-tts-ml-delete-btn:hover {
    color: #b32d2e;
}

/* Animation for processing indicator */
.mementor-tts-spin {
    animation: mementor-tts-spin 2s linear infinite;
    display: inline-block;
}

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

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    th#mementor_tts {
        text-align: center;
    }
    
    .mementor-tts-logoicon-text {
        font-size: 13px;
    }
} 