/* BA Property Management Database - Component Styles */

/* Card Components */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: var(--main-color);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 15px 20px;
    margin: -20px -20px 20px -20px;
    border: none;
}

.card-footer {
    background-color: #f8f9fa;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 15px 20px;
    margin: 20px -20px -20px -20px;
    border: none;
    border-top: 1px solid #e9ecef;
}

/* Stats Cards */
.stats-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stats-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    flex: 1;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.stats-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--main-color);
}

.stats-label {
    font-size: 0.9rem;
    color: var(--muted-text);
    margin-bottom: 0;
    font-weight: 500;
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Button Styles */
.btn {
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--main-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--main-color-dark);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #000;
}

.btn-warning:hover {
    background-color: #e0a800;
    color: #000;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

/* Outline Button Styles */
.btn-outline-primary {
    border: 1px solid var(--main-color);
    color: var(--main-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--main-color);
    border-color: var(--main-color);
    color: white;
}

.btn-outline-info {
    border: 1px solid var(--info-color);
    color: var(--info-color);
    background: transparent;
}

.btn-outline-info:hover {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: white;
}

/* Small Button Styles */
.btn-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 3px;
}

/* Status Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 0.375rem;
}

/* Alert System */
.alert {
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    padding: 15px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1edff;
    border-color: #b8e6ff;
    color: #004085;
}

.alert-warning {
    background-color: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--warning-text);
}

.alert-danger {
    background-color: var(--danger-bg);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.alert i {
    margin-right: 8px;
}

/* Pagination */
.pagination .page-link {
    color: var(--main-color);
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--main-color);
    border-color: var(--main-color);
    color: white;
}

.pagination .page-link:hover {
    color: var(--main-color-dark);
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Form Labels */
.form-label {
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 5px;
}

/* Modal Animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Tooltips */
.tooltip {
    font-size: 0.8rem;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    background-color: var(--main-color);
}

/* Search Container and Styling */
.search-container {
    position: relative;
}

.search-input {
    padding-left: 40px;
    padding-right: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--main-color-rgb), 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-text);
    font-size: 0.9rem;
    z-index: 2;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.search-suggestion:hover {
    background-color: rgba(var(--main-color-rgb), 0.05);
    color: var(--main-color);
}

.search-suggestion:last-child {
    border-bottom: none;
}

/* Navbar Logo Styling */
.navbar-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1); /* Makes logo white */
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Table Row Selection */
.table-custom tbody tr.selected {
    background-color: rgba(var(--main-color-rgb), 0.1) !important;
    border-left: 3px solid var(--main-color);
}

/* Search Highlighting */
.highlight {
    background-color: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card {
        padding: 15px;
        margin-bottom: 0.75rem;
    }
    
    .stats-icon {
        font-size: 2rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .search-input {
        font-size: 0.9rem;
        padding: 8px 35px 8px 35px;
    }
    
    .navbar-logo {
        height: 32px;
    }
}