@charset "utf-8";

/* Mobile-first responsive CSS */
.mip-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 0.3rem;
}

.mip-responsive {
    width: 100%;
    height: auto;
}

.mip-grid {
    display: grid;
    gap: 0.3rem;
}

.mip-grid-1 { grid-template-columns: 1fr; }
.mip-grid-2 { grid-template-columns: repeat(2, 1fr); }
.mip-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mip-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Mobile optimizations */
.mip-touch-friendly {
    min-height: 44px;
    min-width: 44px;
    padding: 0.2rem;
}

.mip-text-large {
    font-size: 0.36rem;
    line-height: 1.4;
}

.mip-text-medium {
    font-size: 0.3rem;
    line-height: 1.4;
}

.mip-text-small {
    font-size: 0.24rem;
    line-height: 1.4;
}

/* Mobile navigation */
.mip-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    z-index: 1000;
}

.mip-nav-item {
    flex: 1;
    text-align: center;
    padding: 0.2rem;
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mip-nav-item.active,
.mip-nav-item:hover {
    color: #53b6c5;
}

.mip-nav-icon {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    margin: 0 auto 0.1rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.mip-nav-text {
    font-size: 0.22rem;
}

/* Mobile cards */
.mip-card {
    background: #fff;
    border-radius: 0.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 0.3rem;
    overflow: hidden;
}

.mip-card-header {
    padding: 0.3rem;
    border-bottom: 1px solid #f0f0f0;
}

.mip-card-body {
    padding: 0.3rem;
}

.mip-card-footer {
    padding: 0.3rem;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
}

/* Mobile forms */
.mip-form-group {
    margin-bottom: 0.3rem;
}

.mip-form-label {
    display: block;
    font-size: 0.26rem;
    font-weight: 500;
    margin-bottom: 0.1rem;
    color: #333;
}

.mip-form-control {
    width: 100%;
    padding: 0.25rem 0.3rem;
    border: 1px solid #ddd;
    border-radius: 0.1rem;
    font-size: 0.28rem;
    transition: border-color 0.2s ease;
}

.mip-form-control:focus {
    outline: none;
    border-color: #53b6c5;
    box-shadow: 0 0 0 2px rgba(83, 182, 197, 0.2);
}

/* Mobile buttons */
.mip-btn {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.15rem;
    font-size: 0.28rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 44px;
}

.mip-btn-primary {
    background: linear-gradient(135deg, #53b6c5, #6aebff);
    color: #fff;
}

.mip-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(83, 182, 197, 0.3);
}

.mip-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.mip-btn-outline {
    background: transparent;
    border: 1px solid #53b6c5;
    color: #53b6c5;
}

.mip-btn-outline:hover {
    background: #53b6c5;
    color: #fff;
}

.mip-btn-block {
    display: block;
    width: 100%;
}

.mip-btn-small {
    padding: 0.15rem 0.3rem;
    font-size: 0.24rem;
}

.mip-btn-large {
    padding: 0.35rem 0.7rem;
    font-size: 0.32rem;
}

/* Mobile alerts */
.mip-alert {
    padding: 0.3rem;
    border-radius: 0.1rem;
    margin-bottom: 0.3rem;
    font-size: 0.26rem;
}

.mip-alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.mip-alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.mip-alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.mip-alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Mobile utilities */
.mip-text-center { text-align: center; }
.mip-text-left { text-align: left; }
.mip-text-right { text-align: right; }

.mip-d-none { display: none; }
.mip-d-block { display: block; }
.mip-d-flex { display: flex; }

.mip-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mip-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mip-w-100 { width: 100%; }
.mip-h-100 { height: 100%; }

/* Mobile spacing */
.mip-m-0 { margin: 0; }
.mip-m-1 { margin: 0.25rem; }
.mip-m-2 { margin: 0.5rem; }
.mip-m-3 { margin: 0.75rem; }

.mip-p-0 { padding: 0; }
.mip-p-1 { padding: 0.25rem; }
.mip-p-2 { padding: 0.5rem; }
.mip-p-3 { padding: 0.75rem; }

/* Responsive breakpoints */
@media (max-width: 576px) {
    .mip-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mip-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .mip-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .mip-container {
        padding: 0 0.2rem;
    }
}
