/* Ask Overlay Styles - Modern UX/UI Implementation */

/* Ask Overlay Base Styles */
.ask-overlay {
    position: fixed;
    bottom: 20px;
    right: 0;
    transform: translateY(0);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

/* Mobile responsive positioning - handled by JavaScript for better browser compatibility */
@media (max-width: 768px) {
    .ask-overlay {
        /* JavaScript will dynamically set position */
    }
    
    /* Hide ask-overlay on campaigns page mobile */
    body.campaigns-page .ask-overlay {
        display: none !important;
    }
}

.ask-overlay.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.ask-overlay-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.ask-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    text-align: left;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.ask-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ask-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.ask-item[data-type="dietitian"] {
    background-color: #E8D5F7;
    color: #47285F;
}

.ask-item[data-type="support"] {
    background-color: #B7D8F7;
    color: #28445F;
}

.ask-item[data-type="whatsapp"] {
    background-color: #B7F7CB;
    color: #285F39;
}

.ask-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #FFFFFF;
    border-radius: 2px;
    flex-shrink: 0;
}
.ask-item[data-type="dietitian"] .ask-icon {
    background-color: #E8D5F7;
}
.ask-item[data-type="support"] .ask-icon {
    background-color: #B7D8F7;
}
.ask-item[data-type="whatsapp"] .ask-icon {
    background-color: #B7F7CB;
}


.ask-icon-svg {
    width: 13.33px;
    height: 13.33px;
    object-fit: contain;
}

.ask-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 520px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.show .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 40px 8px 0;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f8fafc;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 20px;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: #e2e8f0;
    color: #334155;
    transform: scale(1.05);
}

.modal-close:focus {
    outline: none;
}

.modal-content {
    padding: 0 24px 24px 24px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-input,
.form-select,
.ask-overlay-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
    -webkit-appearance: none;
    background-color: #FFFFFF !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    margin: 16px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 12px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    margin-top: 2px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-input:checked + .checkbox-custom {
    background: #3b82f6;
    border-color: #3b82f6;
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    flex: 1;
}

.consent-link {
    color: #3E7B51;
    text-decoration: none;
}

.consent-link:hover {
    text-decoration: underline;
}

.form-note {
    font-size: 14px;
    color: #374151;
    margin: 0 0 12px 0;
    font-weight: 500;
}

.notification-options {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.notification-options .checkbox-label {
    margin-bottom: 0;
    flex: 0 0 auto;
}

.form-submit {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.form-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(5, 150, 105, 0.4);
}

.form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ask-overlay {
        top: 26%;
        right: 15px;
    }
    
    .ask-item {
        font-size: 14px;
        padding: 6px;
        gap: 4px;
    }
    
    .ask-icon {
        width: 14px;
        height: 14px;
    }
    
    .ask-icon-svg {
        width: 11px;
        height: 11px;
    }
    
    .modal-overlay {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-container {
        width: 100%;
        max-height: calc(100vh - 40px);
        margin-top: 0;
    }
    
    .modal-header {
        padding: 20px 20px 16px 20px;
    }
    
    .modal-title {
        font-size: 20px;
        margin-right: 35px;
    }
    
    .modal-close {
        width: 35px;
        height: 35px;
        top: 15px;
        right: 15px;
    }
    
    .modal-content {
        padding: 0 20px 20px 20px;
    }
    
    .notification-options {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 5px;
        padding-top: 10px;
    }
    
    .modal-container {
        width: 100%;
        border-radius: 12px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header {
        padding: 16px 16px 12px 16px;
    }
    
    .modal-title {
        font-size: 18px;
    }
    
    .modal-content {
        padding: 0 16px 16px 16px;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .form-submit {
        padding: 14px 24px;
    }
}