/* Store Settings Custom Styles - Compact Version */

/* Maximize width and minimize padding */
.container-fluid {
    padding: 5px 8px !important;
    max-width: 100% !important;
}

.card {
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 8px !important;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 4px 4px 0 0 !important;
    border: none;
    padding: 8px 12px !important;
}

.card-header h6 {
    color: white;
    font-size: 0.95rem;
    margin: 0 !important;
}

.card-body {
    padding: 12px !important;
}

/* Compact form controls */
.form-group {
    margin-bottom: 8px !important;
}

.form-control, .form-control-file, .custom-select {
    padding: 4px 8px !important;
    font-size: 0.875rem;
    height: calc(1.5em + 0.5rem + 2px);
}

textarea.form-control {
    padding: 6px 8px !important;
    resize: vertical;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.25);
}

/* Compact labels */
label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 3px !important;
    font-size: 0.85rem;
}

.small, small, .form-text {
    font-size: 0.75rem !important;
    margin-top: 2px !important;
}

/* Compact buttons */
.btn {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 8px 16px !important;
    font-size: 0.95rem !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.4);
}

/* Compact rows */
.row {
    margin-left: -8px !important;
    margin-right: -8px !important;
}

.row > [class*="col-"] {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

/* Compact tabs */
.nav-tabs {
    margin-bottom: 12px !important;
    border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-link {
    padding: 6px 12px !important;
    font-size: 0.875rem;
    border-radius: 4px 4px 0 0;
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

/* Compact alerts */
.alert {
    border-radius: 4px;
    border: none;
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
    font-size: 0.875rem;
}

.alert-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.alert i {
    font-size: 0.875rem;
}

/* Compact checkboxes */
.custom-control {
    padding-left: 1.3rem;
    min-height: 1.3rem;
}

.custom-control-label {
    font-size: 0.875rem;
    padding-top: 1px;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #667eea;
    border-color: #667eea;
}

/* Compact images */
.img-thumbnail {
    border: 2px solid #667eea;
    border-radius: 4px;
    padding: 3px;
    max-width: 80px;
    max-height: 80px;
}

/* Compact headings */
h5 {
    font-size: 1rem !important;
    margin-bottom: 10px !important;
}

hr {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
}

/* Additional spacing adjustments */
.mt-2 { margin-top: 4px !important; }
.mt-3 { margin-top: 8px !important; }
.mt-4 { margin-top: 12px !important; }
.mb-2 { margin-bottom: 4px !important; }
.mb-3 { margin-bottom: 8px !important; }
.mb-4 { margin-bottom: 12px !important; }
.my-4 { margin-top: 12px !important; margin-bottom: 12px !important; }

.text-danger {
    color: #dc3545 !important;
}

select.form-control {
    cursor: pointer;
}

/* Desktop: 4 fields per row - Force override Bootstrap */
@media (min-width: 769px) {
    .row .col-md-6,
    .row > .col-md-6,
    .form-group .col-md-6 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
    
    .row .col-md-4,
    .row > .col-md-4,
    .form-group .col-md-4 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
    
    .row .col-md-8,
    .row > .col-md-8,
    .form-group .col-md-8 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    /* Keep full width for specific elements */
    .row .col-md-12,
    .row > .col-md-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Tablet: 3 fields per row */
@media (min-width: 577px) and (max-width: 768px) {
    .row .col-md-6,
    .row > .col-md-6,
    .row .col-md-4,
    .row > .col-md-4,
    .row .col-sm-6,
    .row > .col-sm-6 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

/* Mobile Responsive: 2 fields per row */
@media (max-width: 576px) {
    .container-fluid {
        padding: 4px 6px !important;
    }
    
    .card-body {
        padding: 8px !important;
    }
    
    .btn-lg {
        padding: 7px 14px !important;
        font-size: 0.9rem !important;
    }
    
    .form-control, .form-control-file {
        font-size: 0.8rem;
    }
    
    label {
        font-size: 0.8rem;
    }
    
    /* Mobile: 2 fields per row */
    .row .col-md-6,
    .row > .col-md-6,
    .row .col-md-4,
    .row > .col-md-4,
    .row .col-sm-6,
    .row > .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .row .col-md-8,
    .row > .col-md-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .row .col-md-12,
    .row > .col-md-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
