/* Mobile Responsive Adjustments */
.contact-person-role-group {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
}

.form-select-compact {
    font-size: 12px;
}

/* Phone tab: outcome + lead temp side-by-side */
.phone-outcome-temp-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 768px) {
    .contact-person-role-group {
        grid-template-columns: 2fr 1fr;
    }
    
    /* Keep outcome+temp side-by-side on mobile too */
    .phone-outcome-temp-row {
        grid-template-columns: 1fr 1fr;
    }
    
    #quick-log-visit .prospecting-contact-group {
        grid-template-columns: 1fr;
    }
	
	#quick-log-visit input,
	#quick-log-visit select,
	#quick-log-visit button[type="submit"],
	#quick-log-phone input,
	#quick-log-phone select,
	#quick-log-phone button[type="submit"]	{
		padding: 20px;
		font-size: 15px;
	}

    /* Override padding for the compact role select inside the 2-col row */
    #quick-log-phone .form-select-compact {
        padding: 20px 10px;
        font-size: 12px;
    }
	
	.card-header .card-title {
		min-width: 150px;
	}
    
	#quick-log-visit textarea,
	#quick-log-phone textarea {
		padding: 20px;
		font-size: 15px;
		min-height: 100px;
	}
	
	#quick-log-visit .btn-gps,
	#quick-log-phone .btn-gps {
		right: 15px;
	}
	
    .form-select-compact option {
        font-size: 12px;
    }
}


/* =====================================================
   Scroll-to-top button
   ===================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 28px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 9999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    filter: brightness(1.12);
}

@media (max-width: 768px) {
    /* Remove fixed heights on activity log and action queue so they expand naturally */
    .activity-log-scrollable {
        max-height: none !important;
        height: auto !important;
        overflow-y: visible !important;
        overflow: visible !important;
    }

    .action-queue-grid {
        max-height: none !important;
        height: auto !important;
        overflow-y: visible !important;
        overflow: visible !important;
    }

    /* Also target the tab content panels themselves in case they have overflow */
    #activity-log-tab,
    #action-queue-tab {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Bump scroll-to-top slightly higher on mobile to clear browser chrome */
    .scroll-to-top {
        bottom: 24px;
        right: 16px;
    }
}

/* Activity Filter Controls */
.activity-filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.activity-filter-controls .form-control-sm {
    max-width: 150px;
}

.activity-filter-controls span {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .activity-filter-controls {
        flex-wrap: wrap;
    }
    
    .activity-filter-controls .form-control-sm {
        flex: 1;
        min-width: 120px;
    }
}