/* Common Detail Panel Styles */
/* Used by: SongDetail, CongregationDetail, TalkDetail, SpeakerDetail, UserDetail */

/* Detail Panel - applies to all detail panels */
.detail-panel,
.song-detail,
.invitation-detail,
.congregation-detail,
.talk-detail,
.speaker-detail,
.user-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 0;
    width: 100%;
    height: 100%;
}

    .detail-panel .detail-container,
    .invitation-detail .invitation-detail-container,
    .invitation-detail .detail-container,
    .song-detail .song-detail-container,
    .song-detail .detail-container,
    .congregation-detail .congregation-detail-container,
    .congregation-detail .detail-container,
    .talk-detail .talk-detail-container,
    .talk-detail .detail-container,
    .speaker-detail .speaker-detail-container,
    .speaker-detail .detail-container,
    .user-detail .user-detail-container,
    .user-detail .detail-container {
        height: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

/* Detail Header */
    .detail-panel .detail-header,
    .song-detail .detail-header,
    .invitation-detail .detail-header,
    .congregation-detail .detail-header,
    .talk-detail .detail-header,
    .speaker-detail .detail-header,
    .user-detail .detail-header {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        border-bottom: 1px solid var(--border-color, #e5e7eb);
        background: var(--bg-secondary, #f9fafb);
        flex-shrink: 0;
    }

/* Title row with close button */
        .detail-panel .detail-header h2,
        .song-detail .detail-header h2,
        .invitation-detail .detail-header h2,
        .congregation-detail .detail-header h2,
        .talk-detail .detail-header h2,
        .speaker-detail .detail-header h2,
        .user-detail .detail-header h2 {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary, #1f2937);
            margin: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

/* Header Actions Container */
    .detail-panel .header-actions,
    .song-detail .header-actions,
    .invitation-detail .header-actions,
    .congregation-detail .header-actions,
    .talk-detail .header-actions,
    .speaker-detail .header-actions,
    .user-detail .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

/* Close Button */
    .detail-panel .btn-close,
    .song-detail .btn-close,
    .invitation-detail .btn-close,
    .congregation-detail .btn-close,
    .talk-detail .btn-close,
    .speaker-detail .btn-close,
    .user-detail .btn-close {
        background: none;
        border: none;
        padding: 6px;
        cursor: pointer;
        color: var(--text-secondary, #6b7280);
        border-radius: 4px;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

        .detail-panel .btn-close:hover,
        .song-detail .btn-close:hover,
        .invitation-detail .btn-close:hover,
        .congregation-detail .btn-close:hover,
        .talk-detail .btn-close:hover,
        .speaker-detail .btn-close:hover,
        .user-detail .btn-close:hover {
            background: var(--border-color, #e5e7eb);
            color: var(--text-primary, #1f2937);
        }

        .detail-panel .btn-close svg,
        .song-detail .btn-close svg,
        .invitation-detail .btn-close svg,
        .congregation-detail .btn-close svg,
        .talk-detail .btn-close svg,
        .speaker-detail .btn-close svg,
        .user-detail .btn-close svg {
            width: 20px;
            height: 20px;
        }

/* Detail Content - scrollable area */
    .detail-panel .detail-content,
    .song-detail .detail-content,
    .invitation-detail .detail-content,
    .congregation-detail .detail-content,
    .talk-detail .detail-content,
    .speaker-detail .detail-content,
    .user-detail .detail-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 20px;
        min-height: 0;
    }

/* Form Sections */
    .detail-panel .form-section,
    .song-detail .form-section,
    .invitation-detail .form-section,
    .congregation-detail .form-section,
    .talk-detail .form-section,
    .speaker-detail .form-section,
    .user-detail .form-section {
        margin-bottom: 32px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--border-color, #e5e7eb);
    }

        .detail-panel .form-section:last-of-type,
        .song-detail .form-section:last-of-type,
        .invitation-detail .form-section:last-of-type,
        .congregation-detail .form-section:last-of-type,
        .talk-detail .form-section:last-of-type,
        .speaker-detail .form-section:last-of-type,
        .user-detail .form-section:last-of-type {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .detail-panel .form-section h3,
        .song-detail .form-section h3,
        .invitation-detail .form-section h3,
        .congregation-detail .form-section h3,
        .talk-detail .form-section h3,
        .speaker-detail .form-section h3,
        .user-detail .form-section h3 {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary, #1f2937);
            margin: 0 0 16px 0;
        }

/* Form Elements */
    .detail-panel .form-group,
    .song-detail .form-group,
    .invitation-detail .form-group,
    .congregation-detail .form-group,
    .talk-detail .form-group,
    .speaker-detail .form-group,
    .user-detail .form-group {
        margin-bottom: 20px;
    }

    .detail-panel .form-row,
    .song-detail .form-row,
    .invitation-detail .form-row,
    .congregation-detail .form-row,
    .talk-detail .form-row,
    .speaker-detail .form-row,
    .user-detail .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }

    .detail-panel .form-group label,
    .song-detail .form-group label,
    .invitation-detail .form-group label,
    .congregation-detail .form-group label,
    .talk-detail .form-group label,
    .speaker-detail .form-group label,
    .user-detail .form-group label {
        display: block;
        margin-bottom: 6px;
        font-weight: 500;
        font-size: 14px;
        color: var(--text-primary, #1f2937);
    }

    .detail-panel .required,
    .song-detail .required,
    .invitation-detail .required,
    .congregation-detail .required,
    .talk-detail .required,
    .speaker-detail .required,
    .user-detail .required {
        color: #dc2626;
    }

    .detail-panel .form-control,
    .song-detail .form-control,
    .invitation-detail .form-control,
    .congregation-detail .form-control,
    .talk-detail .form-control,
    .speaker-detail .form-control,
    .user-detail .form-control {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid var(--border-color, #e5e7eb);
        border-radius: 6px;
        font-size: 14px;
        background: white;
        color: var(--text-primary, #1f2937);
    }

        .detail-panel .form-control:focus,
        .song-detail .form-control:focus,
        .invitation-detail .form-control:focus,
        .congregation-detail .form-control:focus,
        .talk-detail .form-control:focus,
        .speaker-detail .form-control:focus,
        .user-detail .form-control:focus {
            outline: none;
            border-color: var(--primary-color, #3b82f6);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .detail-panel .form-control:disabled,
        .song-detail .form-control:disabled,
        .invitation-detail .form-control:disabled,
        .congregation-detail .form-control:disabled,
        .talk-detail .form-control:disabled,
        .speaker-detail .form-control:disabled,
        .user-detail .form-control:disabled {
            background: var(--bg-secondary, #f9fafb);
            color: var(--text-muted, #9ca3af);
            cursor: not-allowed;
        }

    .detail-panel .form-control-plaintext,
    .song-detail .form-control-plaintext,
    .invitation-detail .form-control-plaintext,
    .congregation-detail .form-control-plaintext,
    .talk-detail .form-control-plaintext,
    .speaker-detail .form-control-plaintext,
    .user-detail .form-control-plaintext {
        padding: 10px 0;
        font-size: 14px;
        color: var(--text-secondary, #6b7280);
    }

    .detail-panel .text-muted,
    .song-detail .text-muted,
    .invitation-detail .text-muted,
    .congregation-detail .text-muted,
    .talk-detail .text-muted,
    .speaker-detail .text-muted,
    .user-detail .text-muted {
        color: var(--text-muted, #9ca3af);
        font-size: 13px;
    }

    .detail-panel .validation-message,
    .song-detail .validation-message,
    .invitation-detail .validation-message,
    .congregation-detail .validation-message,
    .talk-detail .validation-message,
    .speaker-detail .validation-message,
    .user-detail .validation-message {
        color: #dc2626;
        font-size: 13px;
        margin-top: 4px;
    }

/* Alerts */
    .detail-panel .alert,
    .song-detail .alert,
    .invitation-detail .alert,
    .congregation-detail .alert,
    .talk-detail .alert,
    .speaker-detail .alert,
    .user-detail .alert {
        padding: 12px 16px;
        border-radius: 6px;
        margin-bottom: 16px;
        font-size: 14px;
    }

    .detail-panel .alert-error,
    .song-detail .alert-error,
    .invitation-detail .alert-error,
    .congregation-detail .alert-error,
    .talk-detail .alert-error,
    .speaker-detail .alert-error,
    .user-detail .alert-error {
        background: #fef2f2;
        border: 1px solid #fecaca;
        color: #dc2626;
    }

    .detail-panel .alert-success,
    .song-detail .alert-success,
    .invitation-detail .alert-success,
    .congregation-detail .alert-success,
    .talk-detail .alert-success,
    .speaker-detail .alert-success,
    .user-detail .alert-success {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        color: #16a34a;
    }

/* Responsive Styles */
@media (max-width: 768px) {
    .detail-panel,
    .song-detail,
    .invitation-detail,
    .congregation-detail,
    .talk-detail,
    .speaker-detail,
    .user-detail {
        width: 100%;
    }

        .detail-panel .detail-header,
        .song-detail .detail-header,
        .invitation-detail .detail-header,
        .congregation-detail .detail-header,
        .talk-detail .detail-header,
        .speaker-detail .detail-header,
        .user-detail .detail-header {
            padding: 12px;
        }

            .detail-panel .detail-header h2,
            .song-detail .detail-header h2,
            .invitation-detail .detail-header h2,
            .congregation-detail .detail-header h2,
            .talk-detail .detail-header h2,
            .speaker-detail .detail-header h2,
            .user-detail .detail-header h2 {
                font-size: 16px;
            }

        .detail-panel .form-row,
        .song-detail .form-row,
        .invitation-detail .form-row,
        .congregation-detail .form-row,
        .talk-detail .form-row,
        .speaker-detail .form-row,
        .user-detail .form-row {
            grid-template-columns: 1fr;
        }

        .detail-panel .detail-content,
        .song-detail .detail-content,
        .invitation-detail .detail-content,
        .congregation-detail .detail-content,
        .talk-detail .detail-content,
        .speaker-detail .detail-content,
        .user-detail .detail-content {
            padding: 16px;
        }
}
