/* Responsive Media Queries for Popup Modal */

/* Fix for bottom cutoff - ensure modal blocker has proper padding and allows scrolling */
.blocker {
    padding: 20px 15px !important;
    overflow-y: auto !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-height: 100vh !important;
}

.modal {
    max-height: none !important;
    overflow: visible !important;
    margin: auto !important;
}

.modal .ld_goal_setting_weekly_goal-grid-item {
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal .ld_goal_setting_weekly_goal-content {
    overflow-y: auto !important;
    flex: 1 !important;
}

@media only screen and (max-width: 768px) {

    /* Reduce popup padding on mobile */
    .modal .ld_goal_setting_weekly_goal-content {
        padding: 25px 15px 30px 15px !important;
    }

    /* Reduce illustration size */
    .pop-up-illustration img {
        max-width: 200px;
        margin-bottom: 15px;
    }

    /* Adjust step labels to prevent overflow */
    .ld_goal_steps {
        margin: 50px 0 40px 0;
    }

    .step_label {
        top: -45px;
        font-size: 14px;
    }

    .step-min {
        font-size: 11px;
    }

    /* Ensure buttons are visible */
    .weekly_goal-button button,
    .weekly_goal-button-remove button {
        width: 100%;
        max-width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }

    /* Reduce header padding */
    .modal .ld_goal_setting_weekly_goal-header {
        padding: 12px 15px;
    }

    .modal .ld_goal_setting_weekly_goal-header h4 {
        font-size: 18px !important;
    }
}

@media only screen and (max-width: 480px) {

    /* Further reduce padding for very small screens */
    .modal .ld_goal_setting_weekly_goal-content {
        padding: 20px 10px 25px 10px !important;
    }

    /* Smaller illustration */
    .pop-up-illustration img {
        max-width: 150px;
    }

    /* Compact step labels */
    .ld_goal_steps {
        margin: 40px 0 35px 0;
    }

    .step_label {
        top: -40px;
        font-size: 12px;
    }

    .step-min {
        font-size: 10px;
    }

    /* Smaller step icons */
    .step_icon {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    /* Compact buttons */
    .weekly_goal-button button {
        padding: 10px 15px;
        font-size: 14px;
    }

    .weekly_goal-button-remove button {
        padding: 10px 15px;
        font-size: 13px;
    }

    /* Smaller header */
    .modal .ld_goal_setting_weekly_goal-header h4 {
        font-size: 16px !important;
    }

    /* Reduce time duration text */
    .ld_goal_setting_weekly_goal-grid-item .ld_goal_setting_weekly_goal-content .time-duration {
        font-size: 12px;
        margin-bottom: 15px;
    }
}