/**
 * ChipWitch Profile Registration Styles
 *
 * Mobile-responsive styles for registration form
 *
 * @package     plg_user_chipwitchprofile
 * @since       2.3.0
 */

/* Location Picker Container */
.chipwitch-location-picker {
    margin: 15px 0;
}

.chipwitch-location-search {
    margin-bottom: 10px;
}

.chipwitch-location-search .form-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.chipwitch-location-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Prevents zoom on iOS */
}

.chipwitch-location-map {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

.chipwitch-location-help {
    margin-top: 10px;
    font-size: 0.9em;
    color: #6c757d;
}

/* Birth Time Field Grouping */
.chipwitch-birth-time {
    margin-bottom: 10px;
}

/* Read-only fields styling */
input[readonly].chipwitch-coordinate {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .chipwitch-location-map {
        height: 300px !important;
    }

    .chipwitch-location-search input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }

    /* Ensure form fields are touch-friendly */
    .chipwitch-location-picker input,
    .chipwitch-location-picker select {
        min-height: 44px; /* iOS touch target minimum */
    }

    /* Stack fields vertically on mobile */
    .chipwitch-location-picker .form-group {
        margin-bottom: 15px;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .chipwitch-location-map {
        height: 350px;
    }
}

/* Accessibility: Focus states */
.chipwitch-location-search input:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Loading state for maps */
.chipwitch-location-map.loading {
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chipwitch-location-map.loading::before {
    content: "Loading map...";
    color: #6c757d;
}
