/**
 * TipologieTavoliEditor - Stili CSS per il componente editor tipologie tavoli
 */

/* Container principale */
.tipologie-editor-container {
    padding: 10px;
}

/* Lista tipologie */
.tipologie-editor-list {
    margin-bottom: 15px;
}

/* Singola tipologia */
.tipologie-editor-item {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    position: relative;
}

.tipologie-editor-item.modified {
    border-color: #ffc107;
    background-color: #fffbeb;
}

.tipologie-editor-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.tipologie-editor-item-title {
    font-weight: bold;
    font-size: 1.1em;
}

.tipologie-editor-item-summary {
    color: #6c757d;
    font-size: 0.9em;
}

.tipologie-editor-item-actions {
    display: flex;
    gap: 10px;
}

.tipologie-editor-item-body {
    display: none;
}

.tipologie-editor-item.expanded .tipologie-editor-item-body {
    display: block;
}

.tipologie-editor-item.expanded .tipologie-editor-toggle-icon {
    transform: rotate(180deg);
}

.tipologie-editor-toggle-icon {
    transition: transform 0.2s ease;
}

/* Righe form */
.tipologie-editor-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.tipologie-editor-row label {
    min-width: 180px;
    font-weight: 500;
    margin: 0;
}

.tipologie-editor-row select,
.tipologie-editor-row input[type="number"] {
    max-width: 150px;
}

/* Bottoni azione */
.tipologie-editor-delete-btn {
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2em;
    padding: 5px;
}

.tipologie-editor-delete-btn:hover {
    color: #a71d2a;
}

.tipologie-editor-save-btn {
    display: none;
}

.tipologie-editor-item.modified .tipologie-editor-save-btn {
    display: inline-block;
}

/* Toolbar */
.tipologie-editor-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tipologie-editor-toolbar .btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tipologie-editor-toolbar .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bottone ricalcola - usa base-color */
.tipologie-editor-toolbar .btn-outline-secondary:hover,
.tipologie-editor-toolbar .btn-outline-secondary:focus,
.tipologie-editor-toolbar .btn-outline-secondary:active,
.tipologie-editor-toolbar .btn-outline-secondary.active {
    background-color: var(--base-color);
    border-color: var(--base-color);
    color: white;
}

/* Bottone aggiungi */
.tipologie-editor-add-btn {
    width: 100%;
    padding: 15px;
    border: 2px dashed #dee2e6;
    background-color: transparent;
    color: #6c757d;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tipologie-editor-add-btn:hover {
    border-color: var(--base-color);
    color: var(--base-color);
    background-color: #f8f9fa;
}

/* Modal nuova tipologia */
.tipologie-editor-modal .modal-body {
    padding: 20px 30px;
}

.tipologie-editor-modal .modal-body .row {
    padding: 10px 0;
    align-items: center;
}

.tipologie-editor-modal .modal-body h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 500;
}

/* Riepilogo totali */
.tipologie-editor-summary {
    background-color: #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.tipologie-editor-summary-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.tipologie-editor-summary-row {
    display: flex;
    padding: 5px 0;
    border-bottom: 1px solid #dee2e6;
}

.tipologie-editor-summary-row:last-child {
    border-bottom: none;
}

.tipologie-editor-summary-row.tipologie-editor-summary-total {
    font-weight: bold;
    border-top: 2px solid #adb5bd;
    margin-top: 5px;
    padding-top: 10px;
}

.tipologie-editor-summary-col1 {
    flex: 1;
}

.tipologie-editor-summary-col2 {
    flex: 0 0 120px;
    text-align: right;
}

.tipologie-editor-summary-col3 {
    flex: 0 0 120px;
    text-align: right;
}

/* Responsive */
@media (max-width: 576px) {
    .tipologie-editor-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .tipologie-editor-row label {
        min-width: auto;
        margin-bottom: 5px;
    }

    .tipologie-editor-row select,
    .tipologie-editor-row input[type="number"] {
        max-width: 100%;
        width: 100%;
    }

    .tipologie-editor-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tipologie-editor-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
