/* General styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px; /* Increase the maximum width */
    width: 100%;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Button styles */
.btn-primary,
.btn-download,
.btn-danger,
.btn-success {
    width: 100%;
    padding: 10px;
    border: none;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    height: 46px; /* Ensure all buttons have the same height */
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-download {
    background-color: #28a745;
}

.btn-download:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-success {
    background-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
}

/* Error message styles */
.error {
    color: red;
    text-align: center;
    margin-top: 10px;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: auto;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    white-space: nowrap;
}

td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu styles */
.menu {
    background-color: #333;
    overflow: hidden;
    width: 100%;
}

.menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.menu ul li {
    float: none;
}

.menu ul li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    background-color: #28a745;
    border-radius: 4px;
    margin: 0 5px;
}

.menu ul li a:hover {
    background-color: #218838;
}

/* Modal styles */
.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.modal-header, .modal-footer {
    border-bottom: 1px solid #e9ecef;
    border-top: 1px solid #e9ecef;
    padding: 15px;
}

.modal-title {
    margin: 0;
}

.modal-body {
    padding: 15px;
}

.close {
    color: #000;
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
}

.close:hover {
    color: #000;
    text-decoration: none;
    opacity: .75;
}

.container-narrow {
    max-width: 50%;
    margin: 0 auto;
}

/* Espacio entre los elementos dinámicos y el botón de registrar */

.form-group:last-of-type {
    margin-bottom: 40px; /* Ajusta el valor según sea necesario */
}

/* Cuando se selecciona título como elemento dinámico (crear títulos para el formulario */

.form-section-title {
    color: #333;
    border-bottom: 2px solid #7e7e86;
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 20px;
}

.form-check-container .form-check.suboption {
    margin-left: 25px;
    position: relative;
}

.form-check-container .form-check.suboption::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    width: 10px;
    height: 1px;
    background-color: #ccc;
}

/* WordPress Integration and Responsive Form Styles */
.webinar-registro-form .form-check-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0.5rem 0;
    width: 100%;
}

.webinar-registro-form .form-check {
    display: inline-flex; /* Changed to inline-flex */
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    width: auto; /* Allow natural width */
    justify-content: flex-start; /* Align to the left */
}

.webinar-registro-form .form-check-input {
    margin: 0;
    padding: 0;
    flex: 0 0 auto; /* Prevent flexbox from affecting input size */
    width: auto; /* Allow natural width */
    position: static; /* Remove any positioning */
}

.webinar-registro-form .form-check-label {
    margin: 0;
    padding: 0;
    flex: 0 1 auto; /* Allow label to shrink if needed */
    white-space: normal; /* Allow text to wrap */
    display: inline; /* Changed to inline */
    cursor: pointer;
}

/* Estilos base para contenedores de formulario */
.form-check-container {
    margin-bottom: 1rem;
    position: relative;
}

/* Estilos para las opciones principales */
.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    position: relative;
}

/* Estilos para el contenedor de subopciones */
.suboptions-container {
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid #eee;
}

/* Estilos específicos para opciones con entrada dinámica */
.form-check.has-dynamic-input {
    flex-direction: column;
    align-items: flex-start;
}

/* Estilos para el campo de texto dinámico */
.dynamic-text-input {
    margin-top: 0.5rem;
    width: calc(100% - 1.5rem);
    margin-left: 1.5rem;
}

/* Estilos específicos para subopciones */
.form-check.suboption {
    margin-left: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

/* Estilos para subopciones con entrada dinámica */
.form-check.suboption.has-dynamic-input {
    margin-bottom: 1rem;
}

/* Ajuste del input dentro de las subopciones */
.form-check.suboption .form-check-input {
    position: absolute;
    left: 0;
    top: 0.25rem;
}

/* Ajuste del label dentro de las subopciones */
.form-check.suboption .form-check-label {
    margin-left: 0.5rem;
}

/* Ajuste del campo dinámico dentro de las subopciones */
.form-check.suboption .dynamic-text-input {
    margin-left: 0;
    width: 100%;
}

/* Remove any Bootstrap overrides that might affect positioning */
.webinar-registro-form input[type="radio"],
.webinar-registro-form input[type="checkbox"] {
    position: static;
    margin-left: 0;
}

.webinar-registro-form .form-check-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.webinar-registro-form .form-check {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    margin-bottom: 5px;
    white-space: nowrap;
    width: 100%;
}

.webinar-registro-form .form-check-input {
    margin: 0;
    flex: 0 0 auto;
}

.webinar-registro-form .form-check-label {
    margin: 0;
    padding: 0;
    display: inline-block;
    white-space: nowrap;
    flex: 0 0 auto;
}

.webinar-registro-form .dynamic-text-input {
    display: inline-block !important;
    width: auto;
    min-width: 150px;
    margin: 0 0 0 8px !important;
    vertical-align: middle;
}

.webinar-registro-form .suboptions-container {
    margin-left: 25px;
    border-left: 2px solid #eee;
    padding-left: 15px;
}

.webinar-registro-form .form-check.has-dynamic-input {
    flex-direction: row !important;
    align-items: center !important;
}

/* Remove any flex wrapping */
.webinar-registro-form .form-check,
.webinar-registro-form .form-check.has-dynamic-input {
    flex-wrap: nowrap !important;
}

/* Override any Bootstrap or other framework styles */
.webinar-registro-form .form-check > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}