/* MILLA Users Editor Styles */
.milla-users-editor-wrapper {
    margin: 0 auto;
    font-family: var(--wp--preset--font-family--sora);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.milla-users-editor-header {
    margin-bottom: 30px;
}


.milla-users-editor-description {
    color: var(--milla-formpage-color-primary-dark);
    font-size: 16px;
    margin: 0;
    opacity: 0.85;
    line-height: 1.6;
}

.milla-users-editor-content {
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--milla-formpage-color-secondary-dark);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Table Styles */
.milla-users-editor-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    table-layout: fixed;
}

.milla-users-editor-table thead {
    height: 65px !important;
}

.milla-users-editor-table th {
    background: var(--milla-formpage-color-primary-light);
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    color: white;
    border-bottom: none;
    font-size: 16px;
}

.milla-users-editor-table th:first-child {
    border-top-left-radius: 50px;
}

.milla-users-editor-table th:last-child {
    border-top-right-radius: 50px;
}

.milla-users-editor-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: middle;
    font-size: 15px;
    color: var(--milla-formpage-color-primary-dark);
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 600;
}

/* User Editor Specific Button Styles */
.milla-users-editor-wrapper .milla-users-editor-edit-button,
.milla-users-editor-wrapper .milla-users-editor-delete-button {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.milla-users-editor-wrapper .milla-users-editor-edit-button {
    background: var(--milla-formpage-color-primary-dark);
    color: white;
}

.milla-users-editor-wrapper .milla-users-editor-edit-button:hover {
    background: var(--milla-formpage-color-primary-alt);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(97, 124, 55, 0.3);
}

.milla-users-editor-wrapper .milla-users-editor-edit-button:focus {
    outline: none !important;
    box-shadow: none !important;
}

.milla-users-editor-wrapper .milla-users-editor-delete-button {
    background: #933400;
    color: white;
    border: none;
}

.milla-users-editor-wrapper .milla-users-editor-delete-button:hover {
    background: #c82333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.milla-users-editor-wrapper .milla-users-editor-delete-button:focus {
    outline: none !important;
    box-shadow: none !important;
}

.milla-users-editor-wrapper .milla-users-editor-delete-button:disabled {
    background: #e5e5e5;
    color: #999;
    border-color: #e5e5e5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Edit Form Row Styles */


.milla-edit-form-row td {
    padding: 20px !important;
    border-bottom: 2px solid #dee2e6 !important;
}

.milla-edit-user-form-container {
    padding: 25px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.milla-edit-user-form-container h5 {
    margin: 0 0 20px 0;
    color: var(--milla-formpage-color-primary-dark);
    font-size: 22px;
    font-weight: 600;
}

/* Form Styles */
.milla-edit-user-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.milla-form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.milla-form-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
    box-sizing: border-box;
}

/* Excepción para el checkbox de cambiar password */
.milla-users-editor-wrapper .milla-form-group:has(.milla-checkbox-label) {
    flex: 0 1 auto;
    min-width: auto;
    justify-content: flex-start;
}

.milla-users-editor-wrapper .milla-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--milla-formpage-color-primary-dark);
    font-size: 16px;
}

.milla-users-editor-wrapper .milla-form-group input,
.milla-users-editor-wrapper .milla-form-group select {
    border: 2px solid var(--milla-formpage-color-secondary-dark) !important;
    border-radius: 50px !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    color: var(--milla-formpage-color-primary-dark) !important;
    background: white !important;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: none !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.milla-users-editor-wrapper .milla-form-group input:focus,
.milla-users-editor-wrapper .milla-form-group select:focus {
    outline: none !important;
    border-color: var(--milla-formpage-color-primary-dark) !important;
    box-shadow: none !important;
}



/* Password Section */
.milla-users-editor-wrapper .milla-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: var(--milla-formpage-color-primary-dark);
    font-size: 16px;
    padding: 0;
    border: none;
    background: none;
}

/* ========================================
   PASSWORD ROW LAYOUT
   ======================================== */
.milla-password-row {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.milla-password-row .milla-form-group {
    flex: 1;
    min-width: 250px;
}

.milla-password-row .generate-btn {
    flex-shrink: 0;
    margin-bottom: 0;
}

/* ========================================
   GENERATE PASSWORD BUTTON
   ======================================== */
.milla-users-editor-wrapper .generate-btn {
    background: var(--milla-formpage-color-secondary) !important;  /* ✅ Mismo color rojo/naranja */
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin-bottom: 20px !important;
}

.milla-users-editor-wrapper .generate-btn:hover {
    background: var(--milla-formpage-color-secondary-dark) !important;  /* ✅ Mismo hover oscuro */
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(97, 124, 55, 0.3) !important;
}

.milla-users-editor-wrapper .generate-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.milla-users-editor-wrapper .generate-btn:active {
    transform: translateY(0) !important;
}

.milla-users-editor-wrapper .milla-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 1.15em !important;
    height: 1.15em !important;
    border: 0.15em solid var(--milla-formpage-color-primary-dark) !important;
    border-radius: 0.35em !important;
    cursor: pointer !important;
    outline: none !important;
    background: white !important;
}

.milla-users-editor-wrapper .milla-checkbox-text {
    font-size: 16px;
    color: var(--milla-formpage-color-primary-dark);
}


.milla-password-form-row {
    margin: 0 !important;
}



.milla-users-editor-wrapper .milla-generate-edit-password {
    background: var(--milla-formpage-color-secondary) !important;  /* ✅ Mismo color rojo/naranja */
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;  /* ✅ Mismo padding que generate-btn */
    border-radius: 50px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    margin-bottom: 20px !important;
}

.milla-users-editor-wrapper .milla-generate-edit-password:hover {
    background: var(--milla-formpage-color-secondary-dark) !important;  /* ✅ Mismo hover */
    transform: translateY(-1px) !important;  /* ✅ Mismo transform */
    box-shadow: 0 4px 12px rgba(97, 124, 55, 0.3) !important;
}

.milla-users-editor-wrapper .milla-generate-edit-password:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Interest Areas */
.milla-interest-areas {
    width: 100%;
}

.milla-interest-areas label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--milla-formpage-color-primary-dark);
    font-size: 16px;
}

.milla-interest-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.milla-users-editor-wrapper .milla-interest-checkbox,
.milla-users-editor-wrapper .milla-area-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    color: var(--milla-formpage-color-primary-dark);
    padding: 12px 18px;
    border-radius: 50px;
    border: 2px solid var(--milla-formpage-color-secondary-dark);
    background: white;
    transition: all 0.2s ease;
    font-weight: 500;
    outline: none;
}


.milla-users-editor-wrapper .milla-interest-checkbox input[type="checkbox"],
.milla-users-editor-wrapper .milla-area-checkbox input[type="checkbox"] {
    font: inherit !important;
    color: var(--milla-formpage-color-primary-dark) !important;
    width: 1.15em !important;
    height: 1.15em !important;
    border: 0.15em solid var(--milla-formpage-color-primary-dark) !important;
    border-radius: 0.35em !important;
    transform: translateY(-0.075em) !important;
    cursor: pointer !important;
    margin: 0 !important;
    outline: none !important;
}

.milla-users-editor-wrapper .milla-interest-checkbox span,
.milla-users-editor-wrapper .milla-area-checkbox span {
    font-size: 16px;
    color: var(--milla-formpage-color-primary-dark);
}

/* Form Actions */
.milla-form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.milla-users-editor-wrapper .submit-btn,
.milla-users-editor-wrapper .milla-form-actions .submit-btn {
    background: var(--milla-formpage-color-primary-dark) !important;
    color: white !important;
    border: none !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.milla-users-editor-wrapper .submit-btn:hover,
.milla-users-editor-wrapper .milla-form-actions .submit-btn:hover {
    background: var(--milla-formpage-color-primary-alt) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(97, 124, 55, 0.3) !important;
}

.milla-users-editor-wrapper .submit-btn:focus,
.milla-users-editor-wrapper .milla-form-actions .submit-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.milla-users-editor-wrapper .milla-cancel-edit,
.milla-users-editor-wrapper .milla-form-actions .milla-cancel-edit {
    background: white !important;
    color: var(--milla-formpage-color-primary-dark) !important;
    border: 2px solid var(--milla-formpage-color-primary-dark) !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

.milla-users-editor-wrapper .milla-cancel-edit:hover,
.milla-users-editor-wrapper .milla-form-actions .milla-cancel-edit:hover {
    background: var(--milla-formpage-color-primary-dark) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(97, 124, 55, 0.3) !important;
}

.milla-users-editor-wrapper .milla-cancel-edit:focus,
.milla-users-editor-wrapper .milla-form-actions .milla-cancel-edit:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Message Styles */
.milla-edit-user-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.milla-edit-user-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.milla-edit-user-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.milla-edit-user-message.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */

/* Desktop grande */
@media (max-width: 1200px) {
    .milla-users-editor-table th,
    .milla-users-editor-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .milla-users-editor-wrapper .milla-users-editor-edit-button,
    .milla-users-editor-wrapper .milla-users-editor-delete-button {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* Tablet grande */
@media (max-width: 1024px) {
    .milla-users-editor-wrapper {
        padding: 15px;
    }
    
    .milla-users-editor-table th,
    .milla-users-editor-table td {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .milla-users-editor-wrapper .milla-users-editor-edit-button,
    .milla-users-editor-wrapper .milla-users-editor-delete-button {
        padding: 7px 12px;
        font-size: 12px;
    }
    
    .milla-interest-checkboxes {
        grid-template-columns: 1fr;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .milla-users-editor-wrapper {
        padding: 10px;
    }
    
    .milla-users-editor-content {
        border-radius: 20px;
    }
    
    .milla-users-editor-header {
        margin-bottom: 20px;
    }
    
    .milla-users-editor-header h4 {
        font-size: 22px;
    }
    
    .milla-users-editor-description {
        font-size: 14px;
    }
    
    /* TABLA - Formato de tarjetas en móvil */
    .milla-users-editor-table {
        display: block;
        width: 100%;
    }
    
    .milla-users-editor-table thead {
        display: none;  /* Oculta encabezados en móvil */
    }
    
    .milla-users-editor-table tbody {
        display: block;
        width: 100%;
    }
    
    .milla-users-editor-table tr {
        display: block;
        margin-bottom: 15px;
        background: white;
        border: 2px solid var(--milla-formpage-color-secondary-dark);
        border-radius: 15px;
        padding: 15px;
    }
    
    .milla-users-editor-table td {
        display: block;
        text-align: left;
        padding: 8px 0;
        border: none;
        font-size: 14px;
    }
    
    .milla-users-editor-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--milla-formpage-color-primary-dark);
        display: inline-block;
        margin-right: 10px;
        min-width: 100px;
    }
    
    .milla-users-editor-table td:last-child {
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid #e5e5e5;
        display: flex;
        gap: 8px;
        justify-content: center;
    }
    
    .milla-users-editor-wrapper .milla-users-editor-edit-button,
    .milla-users-editor-wrapper .milla-users-editor-delete-button {
        flex: 1;
        padding: 10px 15px;
        font-size: 13px;
        margin: 0;
    }
    
    /* FORMULARIO */
    .milla-form-row {
        flex-direction: column;
        gap: 15px;
        flex-wrap: nowrap;
    }
    
    .milla-form-group {
        min-width: auto;
        width: 100%;
        flex: 1 1 100%;
    }
    
    .milla-form-group input,
    .milla-form-group select {
        width: 90% !important;
        max-width: 100% !important;
    }
    
    .milla-password-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .milla-password-row .milla-form-group {
        min-width: 100%;
    }
    
    .milla-users-editor-wrapper .generate-btn {
        font-size: 14px;
        padding: 10px 24px;
    }
    
    .milla-interest-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .milla-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .milla-users-editor-wrapper .submit-btn,
    .milla-users-editor-wrapper .milla-cancel-edit,
    .milla-users-editor-wrapper .milla-generate-edit-password {
        width: 100% !important;
    }
    
    .milla-edit-user-form-container {
        padding: 15px;
    }
    
    .milla-edit-user-form-container h5 {
        font-size: 18px;
    }
    
    .milla-password-toggle {
        padding: 6px;
    }
    
    .milla-password-toggle i {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .milla-users-editor-wrapper {
        padding: 8px;
    }
    
    .milla-users-editor-content {
        border-radius: 15px;
    }
    
    .milla-users-editor-header h2 {
        font-size: 18px;
    }
    
    .milla-users-editor-description {
        font-size: 13px;
    }
    
    .milla-users-editor-table th,
    .milla-users-editor-table td {
        padding: 8px 3px;
        font-size: 10px;
    }
    
    .milla-users-editor-wrapper .milla-users-editor-edit-button,
    .milla-users-editor-wrapper .milla-users-editor-delete-button {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .milla-edit-user-form-container {
        padding: 12px;
    }
    
    .milla-edit-user-form-container h5 {
        font-size: 16px;
    }
    
    .milla-form-group label {
        font-size: 13px;
    }
    
    .milla-form-group input,
    .milla-form-group select {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    
    .milla-users-editor-wrapper .submit-btn,
    .milla-users-editor-wrapper .milla-cancel-edit {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
} 

/* Password toggle functionality */
.milla-password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.milla-password-input-wrapper input[type="password"],
.milla-password-input-wrapper input[type="text"] {
    flex: 1;
    padding-right: 40px;
}

.milla-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.3s ease;
}

.milla-password-toggle:hover {
    color: #333;
}

.milla-password-toggle i {
    font-size: 18px;
} 