.main-location {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.main-location h2 {
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-align: center;
}

.location-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.primary-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.primary-indicator span {
    font-size: 12px;
    color: #E7964F;
    font-family: "Nunito Sans";
    font-weight: 600;
}

.edit-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.edit-btn img{
    width: 20px;
    height: 20px;
}

.edit-btn:hover img {
    opacity: 0.7;
}

.main-location h3 {
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-align: center;
}

.location-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px 40px;
    justify-content: center;
    margin-bottom: 20px;
}

.location-1 {
    border-radius: 10px;
    background-color: #fff;
    border: 2px solid #4D6F8C;
    width: 200px;
    height: 200px;
    text-align: center;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    display: flex;

}


.location-1 > img:first-child {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.modify-btn {
    display: flex;
    width: 103px;
    height: 24px;
    padding: 10px 28px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 5px;
    background: #043259;
    color: #FFF;
    font-family: "Nunito Sans";
    font-size: 10px;
    font-weight: 400;
    margin: 16px auto 0 auto;
}

.modify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 150, 79, 0.4);
    transition: all 0.2s ease;
}

.modify-btn img {
    width: 12px;
    height: 12px;
}

.add-location-btn {
    max-height: 40px;
    border-radius: 5px;
    color: #FFF;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 500;
    display: flex;
    border: none;
    cursor: pointer;
    background: #043259;
    padding: 12px 24px;
    align-items: center;
    text-align: center;
    justify-content: center;
    margin: 0 auto;
    gap: 8px;
    margin-bottom: 40px;
}

.add-location-btn:hover {
    background: rgba(96, 166, 153, 1);
    text-decoration: none;
    transition: all 0.2s ease;
}

.add-location-btn img {
    width: 16px;
    height: 16px;
}

.location-1 h3 {
    color: #163760;
    font-family: "Nunito Sans" !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.location-1 h4 {
    color: #036A6F;
    font-family: "Nunito Sans" !important;
    font-size: 14px !important;
    font-style: normal;
    font-weight: 400 !important;
    line-height: normal;
    margin: 10px !important;
}

.location-img img {
    width: 65px;
    height: 90px;
    aspect-ratio: 1/1;
}

.loc-section-title {
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #E0EEEC;
}

.checkbox-label {
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 16px;
}


.policies-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.metodos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 24px;
    text-align: left;
}

.loc-action-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
}

.loc-header-controls {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.loc-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Nunito Sans";
    font-size: 14px;
    color: #043259;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #60A699;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.btn-deactivate {
    background: #E74C3C;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 12px 24px;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.map-pin-btn {
    margin-top: 8px;
    background: none;
    border: 1px dashed #60A699;
    border-radius: 5px;
    padding: 6px 12px;
    color: #60A699;
    font-family: "Nunito Sans";
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
}

.map-pin-btn:hover {
    background: rgba(96,166,153,0.1);
}

.days-selector {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.day-btn {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    border: 1px solid #60A699;
    background: transparent;
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.day-btn.active {
    background: #60A699;
    color: #fff;
}

.time-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.time-range input[type="time"] {
    flex: 1;
    width: 100%;
    border: 1px solid #60A699;
    background: rgba(176, 217, 205, 0.35);
    border-radius: 5px;
    padding: 8px 12px;
    font-family: "Nunito Sans";
    font-size: 14px;
    color: #043259;
    box-sizing: border-box;
}

.horario-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1 !important;
}

input[type="time"]::-webkit-calendar-picker-indicator {
    display: none;
}

.time-separator {
    color: #043259;
    font-weight: 600;
    font-family: "Nunito Sans";
}

.loc-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 40px 0;
}

.loc-form-container .form-container-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loc-form-container .form-container-header img {
    width: 32px;
    height: 32px;
}

.loc-form-container .form-section {
    border: 2px solid #036A6F;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}

.loc-section-container {
    padding: 24px;
    margin-top: 30px;
    border-radius: 10px;
    border: 2px solid #036A6F;
    background: #FFF;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    justify-content: center;
}

.location-card-actions {
    display: flex;
    gap: 8px;
}

.delete-btn {
    border: none;
    background: transparent;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: rgba(226, 75, 74, 0.08);
}

.delete-btn img {
    width: 18px;
    height: 18px;
}

.required {
    color: #E7964F;
    font-weight: bold;
}

.loc-section-container .form-row .form-group {
    flex: 1;
}

.field-error-text {
    font-size: 12px;
    color: #E56163;
    margin: 4px 0 10px 0;
}

.input-error {
    border: 1.5px solid #E56163 !important;
    background-color: #fff8f8 !important;
}

input[type="checkbox"] {
    accent-color: #036A6F;
}

.loc-section-container .form-row .form-group:first-child {
    flex: 1;
}

.popup-success {
    border: 1px solid #60A699;
    box-shadow: 0 4px 6px 2px #60A699;
}

.popup-error {
    border: 1px solid #FF4D4D;
    box-shadow: 0 2px 2px 2px #FF4D4D;
}

.popup-message {
    font-family: "Nunito Sans";
    color: #043259;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    text-align: center;
    align-items: center;
}

.npi-number {
    color: #036A6F;
    margin-bottom: 10px;
    display: inline-block;
    font-size: 20px;
    font-weight: 600;
    font-family: "Nunito Sans";
}

/* Buttons */
.popup-btn-primary {
    margin-top: 20px;
    background: #043259;
    color: #FFF;
    border-radius: 5px;
    font-family: "Nunito Sans";
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
}

.popup-btn-primary:hover {
    background: rgba(96, 166, 153, 1);
    transition: all 0.2s ease;
}

.popup-btn-error {
    margin-top: 20px;
    background: #E56163;
    color: #FFF;
    border-radius: 5px;
    font-family: "Nunito Sans";
    font-weight: 500;
    padding: 12px 24px;
    font-size: 14px;
    text-align: center;
    border: none;
    cursor: pointer;
}

.popup-btn-error:hover {
    background: #c0392b;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999;
    display: none;
}

.overlay.show {
    display: flex !important;
}


.popup {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    font-family: "Nunito Sans";
    color: #043259;
    display: none;
    z-index: 10000;
}

.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    align-items: flex-start;
    width: 100%;
}

.form-group label {
    color: #043259;
    font-family: "Nunito Sans";
}

.form-group input, .form-group select {
    border: 1px solid #60A699;
    background: rgba(176, 217, 205, 0.35);
    color: #043259;
    cursor: text;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    padding: 8px 40px 8px 16px;
    align-items: center;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 8px;
    font-family: "Nunito Sans";
}

.form-section {
    max-width: 1200;
    border: 2px solid #043259;
    border-radius: 10px;
    padding: 40px;
}

.form-container-header h3{
    font-family: "Nunito Sans";
    font-size: 20px;
    font-weight: 600;
    color: #036A6F;
    flex: 1;
    text-align: center;
    margin: 0;
}

.btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    background: #043259;
    color: white;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    margin: 0;
    box-sizing: border-box;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid #60A699;
    border-radius: 5px;
    background: white;
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.btn-secondary, .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-secondary:hover, .btn-primary:hover {
    background: rgba(96, 166, 153, 1);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary img {
    width: 16px;
    height: 16px;
    gap: 8px;
}


@media (max-width: 768px) {
    .main-location {
        padding: 0 16px;
        margin-top: 24px;
    }

    .day-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .main-location h2 {
        font-size: 20px;
    }

    .main-location h3 {
        font-size: 16px;
    }
    
    .location-container {
        grid-template-columns: 1fr; /* Stack on mobile */
        padding: 16px 20px;
        gap: 16px;
    }
    
    .location-1 {
        margin: 0 auto;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .metodos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .loc-section-container {
        padding: 16px;
    }

    .loc-action-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .loc-action-btns .btn-primary,
    .loc-action-btns .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .policies-grid {
        flex-direction: column;
        gap: 12px;
    }

    .time-range input[type='time'] {
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }


    .time-range .input-with-check {
        flex: 0 0 60px;
        min-width: 0;
    }
}

/* --- MOBILE (480px) --- */
@media (max-width: 480px) {

    .main-location {
        padding: 0 12px;
        margin-top: 16px;
    }

    .form-group input, .form-group select, .day-btn {
        margin-bottom: 8px;
    }

    .form-row .form-group {
        width: 100%;
        box-sizing: border-box;
        padding-right: 0;
    }

    .form-row {
        margin-bottom: 0;
    }

    .main-location h2 {
        font-size: 18px;
    }

    .main-location h3 {
        font-size: 14px;
        padding: 0 16px;
    }

    .form-section {
        padding: 0;
    }

    .location-container {
        padding: 12px;
        gap: 12px;
        flex-direction: column;
        align-items: center;
    }

    .location-1 {
        width: 150px;
        height: 150px;
        padding: 10px;
    }

    .add-location-btn {
        width: 85%;
        padding: 8px 12px;
        font-size: 13px;
        margin-bottom: 40px;
    }

    .location-img img {
        display: none;
    }

    .metodos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .days-selector {
        gap: 14px;
    }

    .day-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .time-range {
    align-items: stretch;
    flex-direction: row;
    align-items: center;
    margin-top: 0;
    }

    .btn-primary {
        margin-bottom: 20px;
    }

    .btn-primary, .btn-secondary {
        padding: 8px 12px;
        font-size: 13px;
    }

    .time-separator {
        text-align: center;
    }

    .loc-section-container {
        padding: 12px;
        margin-top: 16px;
        width: 85%;
        align-items: center;
        margin-left: auto;
        margin-right: auto;
    }

    .loc-section-title {
        font-size: 16px;
    }

    .form-container-header h3 {
        font-size: 16px;
        margin-top: 16px;
    }

    .loc-action-btns {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .loc-action-btns .btn-primary,
    .loc-action-btns .btn-secondary,
    .btn-deactivate {
        width: 90%;
        justify-content: center;
    }

    .popup {
        width: 85%;
        max-width: 85%;
        padding: 20px;
    }

    .loc-header-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .loc-header-controls input[type="checkbox"] {
        margin-left: 8px;
    }

    .checkbox-label, .loc-toggle-row {
        font-size: 14px;
        margin-left: 8px;
    }


}