/* Contenedor General */
.wcfm-presupuesto-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 20px 0;
}

/* Header */
.wcfm-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Botones Generales */
.wcfm_submit_button,
.wcfm_mini_button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.wcfm_submit_button:hover {
    background-color: #0056b3;
}

.wcfm_mini_button {
    padding: 5px 10px;
    font-size: 12px;
    background-color: #28a745;
}

/* Icon Buttons en Tabla */
.wcfm_icon_button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin: 0 5px;
    color: #555;
}

.wcfm_icon_button:hover {
    color: #000;
    transform: scale(1.1);
}

.delete-presupuesto-btn {
    color: #dc3545;
}

.pdf-presupuesto-btn {
    color: #dc3545;
}

/* Tabla Responsive Styling */
.wcfm_table_simple_responsive {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wcfm_table_simple_responsive th,
.wcfm_table_simple_responsive td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.wcfm_table_simple_responsive th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.wcfm_table_simple_responsive tr:hover {
    background-color: #f1f1f1;
}

/* Estados Colors */
.aprobado td {
    border-left: 3px solid #28a745;
}

.pendiente td {
    border-left: 3px solid #ffc107;
}

.rechazado td {
    border-left: 3px solid #dc3545;
}

.wcfm-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
}

.wcfm-badge.aprobado {
    background: #d4edda;
    color: #155724;
}

.wcfm-badge.pendiente {
    background: #fff3cd;
    color: #856404;
}

.wcfm-badge.rechazado {
    background: #f8d7da;
    color: #721c24;
}

/* Formularios */
.wcfm-form-group {
    margin-bottom: 15px;
}

.wcfm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.wcfm_input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* POPUP MODAL (Critical for frontend) */
.wcfm-presupuesto-popup-container {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    padding-top: 50px;
    align-items: flex-start;
    justify-content: center;
}

.wcfm-presupuesto-popup-content {
    background-color: #fff;
    margin: 20px auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 650px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.wcfm-presupuesto-popup-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 10px;
    cursor: pointer;
}

.wcfm-presupuesto-popup-close:hover {
    color: #000;
}

/* Productos Row en Modal */
.producto-row {
    background: #fdfdfd;
    padding: 10px;
    border: 1px solid #e9e9e9;
    margin-bottom: 8px;
    border-radius: 4px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .wcfm_table_simple_responsive thead {
        display: none;
    }

    .wcfm_table_simple_responsive tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
    }

    .wcfm_table_simple_responsive td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        border-bottom: 1px solid #eee;
    }

    .wcfm_table_simple_responsive td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        text-align: left;
        font-weight: bold;
    }

    .actions-cell {
        text-align: center !important;
        padding-left: 0 !important;
    }
