/* Custom CSS for FBR Digital Invoicing System - MDBootstrap Enhancements */

/* Custom color adjustments */
:root {
    --primary-color: #1266f1;
    --success-color: #00b74a;
    --danger-color: #f93154;
    --warning-color: #ffa900;
    --info-color: #39c0ed;
    --dark-color: #262626;
}

/* Body and general layout */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

/* Navbar enhancements */
.navbar-brand {
    font-weight: 500;
    font-size: 1.25rem;
}

/* Card enhancements */
.card {
    border: none;
}

.shadow-3-strong {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Form outline labels - fix positioning for floating labels */
.form-outline .form-control:focus ~ .form-label,
.form-outline .form-control:not(:placeholder-shown) ~ .form-label,
.form-outline .form-select:focus ~ .form-label,
.form-outline .form-select ~ .form-label {
    transform: translateY(-1rem) translateY(0.1rem) scale(0.8);
}

.form-outline .form-label {
    position: absolute;
    top: 0;
    left: 0.75rem;
    padding: 0 0.25rem;
    background-color: white;
    transition: all 0.2s;
    pointer-events: none;
    color: #616161;
}

.form-outline {
    position: relative;
    margin-bottom: 1rem;
}

/* Text danger for required fields */
.text-danger {
    color: var(--danger-color) !important;
}

/* Form text helper */
.form-text {
    font-size: 0.875rem;
    color: #757575;
    margin-top: 0.25rem;
}

/* Item cards styling */
.item-number {
    font-weight: bold;
    color: var(--primary-color);
}

/* Table enhancements */
.table {
    background-color: white;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(18, 102, 241, 0.05);
}

/* Badge customization */
.badge {
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    font-size: 0.875rem;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
    color: #212529 !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

/* Button enhancements */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(18, 102, 241, 0.3);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alert enhancements */
.alert {
    border-radius: 0.375rem;
    border: none;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: rgba(0, 183, 74, 0.1);
    color: #155724;
}

.alert-danger {
    background-color: rgba(249, 49, 84, 0.1);
    color: #721c24;
}

.alert-info {
    background-color: rgba(57, 192, 237, 0.1);
    color: #0c5460;
}

.alert-heading {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Details/accordion styling */
details {
    cursor: pointer;
}

details summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    border-bottom: 1px solid #dee2e6;
}

/* Navbar Mobile Styles */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    width: 1.5em !important;
    height: 1.5em !important;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    padding: 0.5rem 0.75rem !important;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

/* Mobile Navigation Links */
@media (max-width: 991.98px) {
    .navbar-collapse {
        /* background-color: rgba(13, 110, 253, 0.98); */
        border-radius: 0.5rem;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 0.375rem;
        font-size: 1rem;
        transition: all 0.3s ease;
        color: rgba(255, 255, 255, 0.95) !important;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.15);
        transform: translateX(5px);
        color: #ffffff !important;
    }
    
    .navbar-nav .nav-link.active {
        background-color: rgba(255, 255, 255, 0.25);
        font-weight: 600;
        color: #ffffff !important;
    }
    
    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link i {
        font-size: 1.1rem;
        margin-right: 0.5rem;
    }
}

/* Code blocks */
pre {
    background-color: #f5f5f5;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #e83e8c;
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-header h4 {
        font-size: 1.1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus states */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(18, 102, 241, 0.25);
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.h-100 {
    height: 100%;
}
