/* ===========================================================
   CONTENEDOR PRINCIPAL OWNERS
   =========================================================== */

.owners-container {
    background-color: var(--color-container);
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    margin: 0 auto;
}

/* ===========================================================
   TABLA
   =========================================================== */

.table-th-owner {
    padding: 7px;
    text-align: center;
    border-bottom: 2px solid #ddd;
    font-size: 12px;
    color: #2b2b2b;
    background-color: #7ab0f7;
}

.table-td-owner {
    text-align: center;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
    color: #2b2b2b;
}

/* ===========================================================
   POPUPS (IDS EXACTOS DEL HBS)
   =========================================================== */

#popup-create-owner,
#popup-edit-owner,
#popup-delete-owner {
    display: none;                         /* 🔥 ESTO LOS OCULTA */
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    background-color: var(--color-container);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.40);
}

/* ===========================================================
   CIERRE DE POPUP (CLASES REALES DEL HBS)
   =========================================================== */

.close-popup-create-owner,
.close-popup-edit-owner {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.close-popup-create-owner:hover,
.close-popup-edit-owner:hover {
    color: black;
}

/* ===========================================================
   FORMULARIOS DENTRO DE LOS POPUPS
   =========================================================== */

.owner-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group-owner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.form-group-owner label {
    font-size: 14px;
    color: var(--color-titles-container);
    margin-left: 5px;
}

.form-group-owner input {
    padding: 8px;
    border: 1px solid #c4c4c4;
    border-radius: 5px;
    background-color: #fafafa;
    font-size: 13px;
    text-transform: uppercase;
}

/* ===========================================================
   POPUP ELIMINAR
   =========================================================== */

.popup-content-owner-delete {
    display: flex;
    flex-direction: column;
    gap: 25px;
    text-align: center;
}

.owners-delete-btn {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ===========================================================
   BOTONES EDIT / DELETE (CLASES REALES)
   =========================================================== */

.btn-edit-owner,
.btn-delete-owner {
    background: none;
    border: none;
    cursor: pointer;
}

.icon-btn {
    width: 18px;
    height: 18px;
}


/* POPUP CONTACTOS — NUEVO DISEÑO */
#popup-owner-contacts {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; /* más ancho para las columnas */
    max-height: 80vh; /* NO SE SALE DE LA PANTALLA */
    overflow-y: auto; /* scroll interno */
    background-color: var(--color-container);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.40);
}

/* GRID DE 2 COLUMNAS */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Títulos dentro del popup */
.contacts-section-title {
    grid-column: span 2;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 16px;
}

/* Ajuste inputs */
.form-group-owner input {
    width: 100%;
}

.close-popup-owner-contacts {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
    color: #666;
}

.close-popup-owner-contacts:hover {
    color: black;
}

.status-red i { color: #d9534f; }
.status-yellow i { color: #f0ad4e; }
.status-green i { color: #5cb85c; }


.btn-owner-note {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}

.status-red i { color: #d9534f; }
.status-yellow i { color: #f0ad4e; }
.status-green i { color: #5cb85c; }


.textarea-owner {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #bbb;
    background: white;
    resize: vertical;
    font-size: 14px;
}

#popup-owner-note {
    display: none;                  /* 🔥 ESTO LO OCULTA */
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-height: 75vh;
    overflow-y: auto;
    background-color: var(--color-container);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.40);
}

.close-popup-owner-note {
    position: absolute;
    top: 10px;
    right: 10px;
}

.close-popup {
    color: #aaa;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
}

.close-popup:hover {
    color: black;
}

.btn-owner-agreements {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}

.status-red i { color: #d9534f; }
.status-yellow i { color: #f0ad4e; }
.status-green i { color: #5cb85c; }


#popup-owner-agreements,
#popup-agreement-create,
#popup-agreement-edit {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    background-color: var(--color-container);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.agreements-table th,
.agreements-table td {
    font-size: 12px;
    text-align: center;
    padding: 6px;
}

.btn-edit-agreement,
.btn-toggle-agreement {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
}

#popup-owner-agreements .close-popup-owner-agreements {
    position: absolute;
    top: 10px;
    right: 12px;     /* 🔥 lo ponemos a la derecha */
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}
#popup-owner-agreements .close-popup-owner-agreements:hover {
    color: black;
}

/* CLOSE BUTTON AGREEMENTS (Crear / Editar) */
.close-popup-agreement-create,
.close-popup-agreement-edit {
    position: absolute;
    top: 12px;
    right: 15px;      /* 🔥 AHORA A LA DERECHA */
    font-size: 22px;
    cursor: pointer;
    color: #666;
    font-weight: bold;
}

.close-popup-agreement-create:hover,
.close-popup-agreement-edit:hover {
    color: black;
}

.agreement-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-group-owner {
    display: flex;
    flex-direction: column;
}

.form-group-owner label {
    font-weight: 600;
    margin-bottom: 4px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

#popup-agreement-create .btn-save,
#popup-agreement-edit .btn-save {
    margin-top: 10px;
    width: 100%;
}

