/* ArchiRend AI - Mobile Specific Overrides */

/* Mobile Base Styles */
html.is-mobile {
    font-size: 14px;
    overflow-x: hidden;
}

body.is-mobile {
    overflow-x: hidden;
    padding-bottom: 80px; /* Space for mobile action bar */
}

.is-mobile .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    width: 100% !important;
    max-width: 100% !important;
}

/* Header & Navigation */
.is-mobile header {
    margin-bottom: 1.5rem !important;
    padding-top: 0.5rem;
    text-align: center;
}

.is-mobile header h1 {
    font-size: 2.2rem !important;
    margin-bottom: 0.25rem !important;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #6366f1, #a855f7) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

.is-mobile header p {
    font-size: 0.85rem !important;
    opacity: 0.8;
    max-width: 280px;
    margin: 0 auto !important;
    line-height: 1.4;
    text-align: center;
}

/* Fixed Top Bar - Clean & Premium */
.is-mobile .fixed.top-6.right-6 {
    position: sticky !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    background: rgba(13, 17, 23, 0.8) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 1.5rem !important;
    z-index: 1000 !important;
}

.is-mobile .fixed.top-6.right-6 .glass {
    padding: 0.5rem 0.75rem !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Compact Tools Icon in Header for Mobile */
.mobile-tools-link {
    display: none;
}
.is-mobile .mobile-tools-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #a78bfa;
}

/* Premium Navigation Grid for Mobile */
.is-mobile .nav-menu {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    padding: 0.5rem 0 !important;
    margin-bottom: 2rem !important;
    background: transparent !important;
    border: none !important;
    position: relative !important;
    overflow: visible !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.is-mobile .nav-btn {
    width: 100% !important;
    height: 70px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 0.5rem !important;
    transition: all 0.3s ease !important;
}

/* Hide Tools from regular nav on mobile */
.is-mobile .nav-btn[data-view="tools"] {
    display: none !important;
}

.is-mobile .nav-btn.active {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1) !important;
}

.is-mobile .nav-icon {
    font-size: 1.4rem !important;
    margin: 0 !important;
}

.is-mobile .nav-text {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
}

/* Revize Toggle Button */
.revize-toggle-btn {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #a78bfa;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.revize-toggle-btn:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: #a78bfa;
    transform: translateY(-1px);
}

.revize-toggle-btn.active-tercihler {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.revize-toggle-btn.active-tercihler:hover {
    background: rgba(16, 185, 129, 0.3);
}

/* Centered Form Layout */
.is-mobile .view-container {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100% !important;
}

.is-mobile .view-container.active {
    display: flex !important;
}

.is-mobile .premium-card {
    width: 100% !important;
    text-align: center !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    padding-bottom: 1.5rem !important;
}

.is-mobile .card-title-premium {
    justify-content: center !important;
    width: 100% !important;
    font-size: 1.1rem !important;
}

.is-mobile .form-group {
    text-align: center !important;
    margin-bottom: 0.75rem;
}

.is-mobile label {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
}

/* Bento Grid Dashboard Fix */
.is-mobile .bento-grid {
    display: flex !important;
    flex-direction: column;
    gap: 1rem;
}

.is-mobile .bento-card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    min-height: 120px !important;
    width: 100% !important;
    padding: 1.25rem !important;
}

.is-mobile .bento-card .flex {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
}

/* Info Tooltip Styles */
.card-title-premium {
    position: relative; /* Needed for absolute positioning of tooltip */
}

.info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(139, 92, 246, 0.4);
    border: 2px solid rgba(139, 92, 246, 0.8);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 900;
    color: #ffffff;
    cursor: pointer;
    margin-left: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    vertical-align: middle;
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.info-trigger:hover, .info-trigger.active {
    background: #8b5cf6;
    color: #fff;
    border-color: #ffffff;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.9);
    transform: scale(1.25);
}

.info-content {
    display: none;
    position: fixed;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 85% !important;
    max-width: 340px !important;
    padding: 24px !important;
    background: #0d1117 !important; /* Fully solid background */
    border: 2px solid #8b5cf6 !important;
    border-radius: 24px !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #ffffff !important;
    z-index: 10000 !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.95) !important;
    pointer-events: auto !important;
    text-align: left !important;
}

/* Modal overlay effect when tooltip is open */
.info-content.show::after {
    content: '';
    position: fixed;
    top: -500vh;
    left: -500vw;
    width: 1000vw;
    height: 1000vh;
    background: rgba(0, 0, 0, 0.8) !important; /* Darker, more solid overlay */
    z-index: -1;
    pointer-events: none;
}

.info-content.show {
    display: block !important;
    animation: tooltipPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tooltipPop {
    from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.info-content b {
    color: #a78bfa !important;
    display: block !important;
    font-size: 1.15rem !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3) !important;
    padding-bottom: 8px !important;
    font-weight: 800 !important;
}

.info-content p {
    margin: 0 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
    color: #e5e7eb !important;
}

/* Desktop Hover Support - Keep it centered but maybe more subtle? */
@media (min-width: 1024px) {
    /* Optional: Different desktop style if preferred */
}



/* Specific Modal Fixes */
.is-mobile .modal-content,
.is-mobile .furniture-modal-content,
.is-mobile .bento-card-content,
.is-mobile #visionAnalysisModal > div {
    width: 95% !important;
    max-width: 95% !important;
    max-height: 85vh;
    padding: 1.25rem !important;
    overflow-y: auto;
}

.is-mobile #imageGalleryModal {
    padding: 5px !important;
}

.is-mobile #galleryCloseBtn {
    top: 5px !important;
    right: 5px !important;
    width: 35px;
    height: 35px;
    font-size: 20px;
}

.is-mobile #galleryMainImage {
    max-height: 65vh !important;
}

/* Forms & Inputs Generic */
.is-mobile select, 
.is-mobile input,
.is-mobile textarea {
    padding: 0.6rem 0.75rem !important;
    font-size: 16px !important; /* No zoom */
    border-radius: 10px !important;
}

/* Action Buttons */
.is-mobile .mobile-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    z-index: 1000;
    display: flex !important;
    gap: 0.75rem;
}

.is-mobile .mobile-action-bar .btn-primary {
    flex: 1;
    padding: 0.8rem !important;
    font-size: 0.9rem !important;
    border-radius: 12px !important;
}

/* Hide desktop only elements */
.is-mobile .desktop-only,
.is-mobile #floatingRenderBtn {
    display: none !important;
}

/* Hide Advanced from all platforms */
.advanced-toggle, 
#advancedMode,
label[for="advancedMode"],
.advanced-container {
    display: none !important;
}
