/* Custom Styles for Hosting Management System - Mobile First */

/* Base Styles - Mobile First */
body {
    background-color: #f8f9fa;
    font-size: 14px;
}

.min-vh-100 {
    min-height: 100vh;
}

/* Container padding for mobile */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Dashboard Statistics Cards - Mobile First */
.stat-card {
    border: none;
    min-height: 120px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stat-card h6 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-card h2 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card small {
    font-size: 0.7rem;
    line-height: 1.4;
}

/* Responsive adjustments for stat cards */
@media (min-width: 576px) {
    .stat-card {
        min-height: 130px;
    }
    
    .stat-card h2 {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .stat-card {
        min-height: 140px;
    }
    
    .stat-card .card-body {
        padding: 1.5rem;
    }
    
    .stat-card h2 {
        font-size: 2.5rem;
    }
}

@media (min-width: 992px) {
    .stat-card {
        min-height: 150px;
    }
}

/* XL screens - 5 equal width cards */
@media (min-width: 1200px) {
    .stats-row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .stats-row > .col-xl-auto {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Table row colors for expiration warnings */
.table-danger {
    background-color: #f8d7da !important;
}

.table-warning {
    background-color: #fff3cd !important;
}

/* Card hover effect - Desktop only */
@media (hover: hover) and (pointer: fine) {
    .card {
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
}

/* Badge styles */
.badge {
    font-size: 0.875em;
    padding: 0.35em 0.65em;
}

/* Navbar styles */
.navbar-brand {
    font-weight: bold;
}

/* Modal styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

/* Alert styles */
.alert {
    border-radius: 0.375rem;
}

/* Button styles */
.btn {
    border-radius: 0.375rem;
}

/* Prevent buttons from expanding in flex containers */
.btn {
    flex-grow: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Form styles */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Responsive table - Mobile First */
.table-responsive {
    border-radius: 0.375rem;
    -webkit-overflow-scrolling: touch;
}

/* Table adjustments for mobile */
@media (max-width: 767.98px) {
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Dashboard cards - already handled by stat-card */

/* Expiration warning colors */
.expiring-soon {
    color: #856404;
    font-weight: bold;
}

.expired {
    color: #721c24;
    font-weight: bold;
}

/* Prevent overflow in header sections */
.d-flex.flex-column.flex-sm-row {
    min-width: 0; /* Allows flex items to shrink below their minimum content size */
}

.d-flex.flex-column.flex-sm-row h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile-first responsive improvements */
@media (max-width: 575.98px) {
    /* Smaller padding on mobile */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Smaller headings on mobile */
    h2 {
        font-size: 1.5rem;
    }
    
    /* Better button spacing */
    .btn {
        padding: 0.5rem 1rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    /* Card body padding */
    .card-body {
        padding: 1rem;
    }
}

/* Navbar alignment fixes */
.navbar-text {
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
    margin-bottom: 0;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

/* Navbar mobile improvements */
@media (max-width: 991.98px) {
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-text {
        margin-bottom: 0.5rem;
    }
}

/* Better spacing for mobile tables */
@media (max-width: 767.98px) {
    .table-responsive {
        border: none;
    }
    
    /* Stack action buttons on mobile */
    .d-flex.gap-1.gap-sm-2 {
        gap: 0.25rem !important;
    }
}

/* Form improvements for mobile */
@media (max-width: 575.98px) {
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .input-group {
        flex-wrap: wrap;
    }
    
    .input-group .btn {
        flex: 1 1 auto;
        min-width: 80px;
    }
}

