/*
 * Estilos personalizados para el modal y el formulario de R-Tech Custom Fields.
 */

/* Contenedor principal del modal */
.rtech-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    overflow-y: auto;
}

/* Fondo oscuro y desenfocado */
.rtech-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Contenido del modal */
.rtech-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 900px; /* Ancho máximo aumentado */
    margin: 5vh auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease-out;
}

/* Estado visible del modal */
.rtech-modal.is-visible {
    display: block;
}

.rtech-modal.is-visible .rtech-modal-content {
    transform: scale(1);
    opacity: 1;
}

/* Botón de cierre */
.rtech-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.rtech-modal-close:hover {
    color: #333;
}

/* Cuerpo del modal donde irá el formulario */
.rtech-modal-body {
    margin-top: 20px;
}

.rtech-modal-body .form-row {
    margin-bottom: 15px;
}

.rtech-modal-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.rtech-modal-body input[type="text"],
.rtech-modal-body textarea,
.rtech-modal-body select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rtech-modal-body .required {
    color: red;
}

/* --- NUEVOS ESTILOS --- */

/*
 * Estilo para que el botón personalizado ocupe todo el ancho.
 */
.rtech-full-width-button {
    width: 100%;
    margin-top: 50px;
}

/* --- Estilos para Pestañas --- */
.rtech-tabs-nav {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    border-bottom: 2px solid #eee;
}

.rtech-tabs-nav li {
    margin: 0 10px -2px 0;
    padding: 0;
}

.rtech-tabs-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    border: 2px solid transparent;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
}

.rtech-tabs-nav li.active a {
    color: #000;
    font-weight: bold;
    border-color: #eee;
    border-bottom-color: #fff; /* O el color de fondo del modal-body */
}

.rtech-tab-pane {
    display: none;
}

.rtech-tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rtech-submit-button {
    margin-top: 20px;
    width: 100%;
}

/* --- Estilos para la opción "Copiar datos" --- */
.rtech-copy-from-main-wrapper {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.rtech-copy-from-main-wrapper input[type="checkbox"] {
    margin-right: 10px;
    width: auto; /* Sobrescribir el 100% de ancho */
}

.rtech-copy-from-main-wrapper label {
    margin-bottom: 0; /* Sobrescribir el margen por defecto */
    font-weight: normal;
}