/* Mobile-Specific Styles */

.mobile-ssl-checker {
    margin-bottom: 2rem;
}

.mobile-form {
    width: 100%;
}

.input-group {
    display: flex;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-input {
    flex: 1;
    padding: 1rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.mobile-btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.mobile-btn-primary:hover {
    background: #2563eb;
}

.mobile-result-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.domain-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.domain-info h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.grade-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
}

.grade-A\+, .grade-A {
    background: #dcfce7;
    color: #166534;
}

.grade-A-, .grade-B {
    background: #dbeafe;
    color: #1e40af;
}

.grade-C {
    background: #fef3c7;
    color: #92400e;
}

.grade-D, .grade-F {
    background: #fecaca;
    color: #991b1b;
}

.card-body {
    padding: 1rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.info-row .label {
    color: #6b7280;
    font-size: 0.875rem;
}

.info-row .value {
    font-weight: 500;
    font-size: 0.875rem;
}

.card-actions {
    padding: 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.mobile-btn-outline {
    display: block;
    width: 100%;
    padding: 0.75rem;
    text-align: center;
    border: 2px solid #3b82f6;
    color: #3b82f6;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.mobile-btn-outline:hover {
    background: #3b82f6;
    color: white;
}

/* Mobile Navigation Enhancements */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e2e8f0;
        padding: 0.5rem;
        z-index: 50;
    }
    
    .mobile-nav-items {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        color: #6b7280;
        text-decoration: none;
        font-size: 0.75rem;
        transition: color 0.3s;
    }
    
    .mobile-nav-item.active {
        color: #3b82f6;
    }
    
    .mobile-nav-item i {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    
    /* Adjust main content for mobile nav */
    .main-content {
        padding-bottom: 5rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn, .mobile-btn-primary, .mobile-btn-outline {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Larger form inputs */
    input, select, textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better spacing for touch */
    .card {
        margin-bottom: 1.5rem;
    }
    
    .btn-group .btn {
        margin-bottom: 0.75rem;
    }
}

/* Swipe gestures for mobile */
.swipe-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.swipe-container::-webkit-scrollbar {
    display: none;
}

/* Ensure all popups are hidden by default */
.mobile-menu,
.mobile-menu-overlay,
.dropdown-menu,
[id*="dropdown"] {
    display: none !important;
}

.mobile-menu.open {
    display: block !important;
}

.mobile-menu-overlay.active {
    display: block !important;
}

.dropdown-menu:not(.hidden) {
    display: block !important;
}

/* Mobile-optimized tables */
@media (max-width: 640px) {
    .mobile-table {
        display: block;
    }
    
    .mobile-table thead {
        display: none;
    }
    
    .mobile-table tbody,
    .mobile-table tr,
    .mobile-table td {
        display: block;
    }
    
    .mobile-table tr {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        padding: 1rem;
        display: none;
    }
    
    .mobile-table td {
        border: none;
        padding: 0.5rem 0;
        position: relative;
        padding-left: 40%;
    }
    
    .mobile-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        display: block;
        width: 35%;
        font-weight: 600;
        color: #374151;
    }
}