/* ---------- Shortcode Frontend Styling ---------- */

.udb-frontend-dashboard {
    padding: 1rem;
    font-family: inherit;
}

.udb-city {
    margin-bottom: 2rem;
}

.udb-city .udb-city-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.5rem;
}

.udb-site {
    margin-left: 1rem;
    margin-bottom: 1.5rem;
}

.udb-site .udb-site-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.udb-site-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.udb-item-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.udb-item-tab {
    background: #f3f3f3;
    border: 1px solid #ccc;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-radius: 4px;
}

.udb-item-tab:hover {
    background: #eaeaea;
}

.udb-item-tab.active {
    background: var(--primary-color, #0073aa);
    color: #fff;
    border-color: var(--primary-color, #0073aa);
}

.udb-item-panels {
    flex: 3;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    padding: 1rem;
}

.udb-item-panel {
    display: none;
}

.udb-item-panel.active {
    display: block;
}

.udb-item-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    margin-bottom: 1rem;
}

.udb-item-buttons a.udb-button {
    color: #fff;
}

.udb-item-buttons:hover a.udb-button {
    color: #fff;
}

@media (min-width: 768px) {
    .udb-item-tabs {
        flex-basis: 30%;
    }

    .udb-item-panels {
        flex-basis: 60%;
    }

}

.udb-button,
.button.udb-button-primary.button-primary {
    background: var(--secondary-color);
    color: #fff;
    text-decoration: none;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    display: block;
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1));
    text-decoration: none !important;
    transition: all 0.3s ease-in-out;
    display: inline-block;
    border: none;
}



.udb-button:hover,
.button.udb-button-primary.button-primary:hover {
    background: var(--primary-color);
    color: #fff;
}

.udb-reports-title {
    padding-top: 1rem;
}

.udb-section-title h4,
.udb-reports-title h4 {
    text-align: center;
    margin-bottom: 1.2rem;
    margin-top: 1rem;
}

.udb-years {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.udb-year {
    margin-bottom: 0.75rem;
}

.udb-year strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.udb-months {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-weight: 500;
    gap: 1rem;
}

.udb-months li:has(a) {
    background-color: var(--primary-color);
    border-radius: 4px;

}

.udb-months li {
    flex-basis: 40%;
    margin-bottom: 0.3rem;
    text-align: center;
    padding: .35rem;
    background-color: #ebebeb;
    transition: all .3s ease-in-out;
    border-radius: 4px;
}

.udb-months li:has(a):hover {
    background-color: var(--secondary-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1));
}

.udb-months li a {
    color: white;
    width: 100%;
    height: 100%;
    transition: all .3s ease-in-out;
    text-decoration: none;
    display: block;
}

.udb-months li:has(a):hover a {
    text-decoration: none;
    color: #fff;
}

.udb-months li span {
    color: inherit;
}

.m-top-20 {
    margin-top: 20px;
}

/*Header*/
.udb-user-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1rem 0;
    gap: 1.5rem;
}

.udb-header-left {
    flex-shrink: 0;
}

.udb-header-logo {
    height: 60px;
    width: auto;
}

.udb-header-right {
    flex: 1;
    min-width: 200px;
    color: #333;
    display: flex;
    justify-content: center;
}



.udb-header-right div {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.udb-header-right strong {
    color: var(--primary-color);
}

.udb-header-logout {
    align-self: start;
}

.udb-header-logout .udb-logout-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.udb-header-logout .udb-logout-btn:hover {
    background: #eee;
}

.udb-header-divider {
    border-bottom: 2px solid var(--secondary-color);
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Export Section Styling */
.udb-export-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.udb-export-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.udb-export-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.udb-export-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.udb-export-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.udb-export-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.udb-export-csv {
    background: #28a745;
}

.udb-export-csv:hover {
    background: #218838;
}

.udb-export-json {
    background: #17a2b8;
}

.udb-export-json:hover {
    background: #138496;
}

.udb-export-pdf {
    background: #dc3545;
}

.udb-export-pdf:hover {
    background: #c82333;
}

/* Responsive design for export buttons */
@media (max-width: 768px) {
    .udb-export-buttons {
        flex-direction: column;
    }

    .udb-export-btn {
        text-align: center;
        justify-content: center;
    }
}

/* Bulk Export Styling */
.udb-bulk-export {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.udb-bulk-export h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.udb-bulk-export p {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

/* User Export Tabs Styling */
.udb-user-exports {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.udb-user-exports h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

.udb-user-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 0.5rem;
}

.udb-user-tab {
    padding: 0.75rem 1.5rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.udb-user-tab:hover {
    background: #e9ecef;
    color: #007cba;
}

.udb-user-tab.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
    border-bottom-color: #007cba;
}

.udb-user-tab-content {
    min-height: 200px;
}

.udb-tab-panel {
    display: none;
    padding: 1.5rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.udb-tab-panel.active {
    display: block;
}

.udb-user-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007cba;
    line-height: 1.6;
}

.udb-user-info strong {
    color: #495057;
    display: inline-block;
    min-width: 80px;
}

/* Responsive tabs */
@media (max-width: 768px) {
    .udb-user-tabs {
        flex-direction: column;
    }

    .udb-user-tab {
        border-radius: 5px;
        margin-bottom: 0.25rem;
    }

    .udb-user-tab.active {
        border-radius: 5px;
    }
}

/*Password*/
.udb-password-wrapper {
    position: relative;
}

.udb-password-wrapper input {
    padding-right: 40px;
    width: 100%;
}


.udb-password-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


#udb_user_pass {
    width: 90%;
    max-width: 300px;
}


#toggle-password:hover {
  background-color: var(--primary-color);
}

.usuario-formulario [type="button"]:focus {
    background-color: transparent !important;
}


#toggle-password {
    width: calc(10% - 10px);
    cursor: pointer;
    border: 1px solid #ccc;
}

div#password-strength-message {
    width: 100%;
}

input.regular-text {
    max-width: 500px;
}

.udb-export-buttons a {
    color: #fff !important;
}

/* Styling for placeholder month selects in admin forms */
select[data-name="month_name"]:has(option[value="Selecciona un mes"]:checked),
select:has(option[value="Selecciona un mes"]:checked) {
    color: #999;
    font-style: italic;
}

/* Target the placeholder option specifically */
option[value="Selecciona un mes"] {
    color: #999;
    font-style: italic;
}

/* Make non-placeholder options normal */
select option:not([value="Selecciona un mes"]) {
    color: #333;
    font-style: normal;
}

/* Frontend display styling for month placeholders */
.udb-month-placeholder {
    color: #999;
    font-style: italic;
}

/* When "Selecciona un mes" is selected in forms */
[data-name="month_name"] select[value="Selecciona un mes"] {
    color: #999;
    font-style: italic;
}

/* Month confirmation button styling */
.udb-month-confirm {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.udb-confirm-month {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.udb-confirm-month:hover:not(:disabled) {
    transform: scale(1.05);
}

/* Incomplete state - fields not filled */
.udb-confirm-month.udb-incomplete {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

.udb-confirm-month.udb-incomplete:hover {
    transform: none;
    background: #f5f5f5;
    border-color: #ddd;
}

/* Ready state - fields complete, ready to confirm */
.udb-confirm-month.udb-ready {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #4caf50;
    cursor: pointer;
}

.udb-confirm-month.udb-ready:hover {
    background: #d4edda;
    border-color: #28a745;
}

/* Locked state - confirmed and locked */
.udb-confirm-month.udb-locked {
    background: #4caf50;
    border-color: #4caf50;
    color: white;
    cursor: pointer;
}

.udb-confirm-month.udb-locked:hover {
    background: #45a049;
    border-color: #45a049;
}

/* Disabled fields styling */
input:disabled, select:disabled {
    background-color: #f5f5f5 !important;
    color: #666 !important;
    cursor: not-allowed;
}
/* Visual feedback for completed vs incomplete rows */
.udb-inline-row:has(.udb-ready) {
    background-color: #f8fff8;
    border-left: 3px solid #4caf50;
    padding-left: 1rem;
    border-radius: 4px;
}

.udb-inline-row:has(.udb-locked) {
    background-color: #dfdfdf
    border-left: 3px solid #4caf50;
    padding-left: 1rem;
    opacity: 0.8;
}

/* Adjust inline group to accommodate the new button */
.udb-inline-row .udb-inline-group {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex: 1;
}
/*Month edit buttons*/
.button.udb-confirm-month.udb-locked:hover{
}
.button.udb-confirm-month.udb-locked{
    align-self: end;
}