/* Manage Voices Dialog Stylesheet */

/* Modal overlay - unique class to avoid conflicts with dialog-voicerecording.css */
.mv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.mv-modal-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

/* Voices table container */
.voices-table-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Voices table */
.voices-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.voices-table thead {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 10;
}

.voices-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.voices-table th:first-child {
    width: 50px;
    text-align: center;
}

.voices-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.voices-table tbody tr:hover {
    background-color: #f8f9fa;
}

.voices-table tbody tr.selected {
    background-color: #e3f2fd;
}

.voices-table td {
    padding: 12px;
}

.voices-table td:first-child {
    text-align: center;
}

/* Radio button styling */
.voices-table input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Voice name cell */
.voice-name-cell {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

/* Action buttons container */
.action-buttons-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* Action button */
.action-btn {
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    background: #007bff;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.action-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.action-btn.delete-btn {
    background: #dc3545;
}

.action-btn.delete-btn:hover:not(:disabled) {
    background: #c82333;
}

/* Back button container */
.back-button-container {
    display: flex;
    justify-content: center;
}

/* Back button */
.back-btn {
    padding: 10px 32px;
    border-radius: 6px;
    border: 2px solid #6c757d;
    background: white;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.back-btn:active {
    transform: translateY(0);
}

/* Smaller modal variant (for rename and delete dialogs) */
.mv-modal-dialog-small {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 100%;
}

/* Rename dialog specific styles */
.rename-dialog-content {
    padding: 20px;
}

.rename-current-name {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.rename-current-name strong {
    color: #333;
}

.rename-input-container {
    margin-bottom: 20px;
}

.rename-input-container label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.rename-input-container input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.rename-input-container input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Delete dialog specific styles */
.delete-dialog-content {
    padding: 20px;
    text-align: center;
}

.delete-message {
    font-size: 1rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.delete-voice-name {
    font-weight: 600;
    color: #dc3545;
}

/* Dialog buttons container */
.dialog-buttons-container {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Dialog buttons */
.dialog-btn {
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 90px;
}

.dialog-btn-primary {
    background: #007bff;
    color: white;
}

.dialog-btn-primary:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dialog-btn-danger {
    background: #dc3545;
    color: white;
}

.dialog-btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dialog-btn-secondary {
    background: white;
    color: #6c757d;
    border: 2px solid #6c757d;
}

.dialog-btn-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dialog-btn:active {
    transform: translateY(0);
}

/* Status message in dialog */
.dialog-status {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
}

.dialog-status.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.dialog-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dialog-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Empty state */
.voices-empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 1rem;
}

/* Loading state */
.voices-loading-state {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 1rem;
}

/* Mobile/Phone Responsive Layout */
@media (max-width: 600px) {
    .mv-modal-dialog-small {
        max-width: 90%;
        margin: 0 20px;
    }

    .voices-table-container {
        max-height: 250px;
    }

    .voices-table th,
    .voices-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    .voices-table th:first-child,
    .voices-table td:first-child {
        width: 40px;
    }

    .voices-table input[type="radio"] {
        width: 18px;
        height: 18px;
    }

    .action-buttons-container {
        flex-direction: column;
        gap: 10px;
    }

    .action-btn {
        width: 100%;
        min-width: unset;
    }

    .back-btn {
        width: 100%;
    }

    .dialog-buttons-container {
        flex-direction: column;
        gap: 10px;
    }

    .dialog-btn {
        width: 100%;
        min-width: unset;
    }

    .rename-dialog-content,
    .delete-dialog-content {
        padding: 15px;
    }
}
