/* Mobile-specific modal overrides */

/* Make modal 50% of viewport, centered - SOLID SQUARE */
.callout-modal,
body .callout-modal,
.phone-frame .callout-modal {
    width: 50vw !important;
    max-width: 50vw !important;
    min-width: 50vw !important; /* Override min-width from main CSS */
    height: 50vh !important;
    max-height: 50vh !important;
    margin: 0 auto !important; /* Move to top of screen */
    border-radius: 12px !important;
    font-size: 14px !important;
    padding: 1rem !important; /* Reduce padding for square */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Adjust modal header for mobile */
.callout-modal-header {
    padding: 16px 20px !important;
    border-radius: 12px 12px 0 0 !important;
}

.callout-modal-title {
    font-size: 18px !important;
    font-weight: 600 !important;
}

.callout-modal-date {
    font-size: 14px !important;
    margin-top: 4px !important;
}

/* Adjust modal body for mobile */
.callout-modal-body {
    padding: 20px !important;
    max-height: calc(50vh - 120px) !important;
    overflow-y: auto !important;
}

/* Make form elements bigger for touch */
.callout-form-group {
    margin-bottom: 20px !important;
}

.callout-form-label {
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.callout-date-input,
.callout-status-dropdown,
.callout-reason-select,
.callout-reason-textarea {
    width: 100% !important;
    padding: 12px !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
    border-radius: 8px !important;
    border: 1px solid var(--border-blue) !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.callout-reason-textarea {
    min-height: 80px !important;
    resize: vertical !important;
}

/* Make buttons bigger for touch */
.callout-modal-footer {
    padding: 16px 20px !important;
    gap: 12px !important;
}

.callout-btn {
    padding: 12px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    min-height: 44px !important; /* Touch target size */
}

.callout-btn-primary {
    background: var(--blue-primary) !important;
    color: white !important;
    border: none !important;
}

.callout-btn-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-blue) !important;
}

.callout-btn-danger {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
}

/* Adjust overlay for mobile */
.callout-modal-overlay {
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(4px) !important;
}

/* Make close button bigger */
.callout-modal-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    border-radius: 50% !important;
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-blue) !important;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 768px) {
    .callout-modal,
    body .callout-modal,
    .phone-frame .callout-modal {
        width: 50vw !important;
        max-width: 50vw !important;
        min-width: 50vw !important;
        height: 50vh !important;
        max-height: 50vh !important;
        margin: 0 auto !important;
        padding: 1rem !important;
    }
}

@media (max-width: 480px) {
    .callout-modal,
    body .callout-modal,
    .phone-frame .callout-modal {
        width: 50vw !important;
        max-width: 50vw !important;
        min-width: 50vw !important;
        height: 50vh !important;
        max-height: 50vh !important;
        margin: 0 auto !important;
        padding: 0.8rem !important;
    }
    
    .callout-modal-body {
        padding: 16px !important;
    }
    
    .callout-modal-header {
        padding: 12px 16px !important;
    }
    
    .callout-modal-footer {
        padding: 12px 16px !important;
    }
}

/* Ensure modal is above phone frame */
.callout-modal,
.callout-modal-overlay {
    z-index: 9999 !important;
}
