/**
 * Common Component Styles
 * Shared styles used across multiple views in the application
 */

/* Dropdown Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    padding: 0;
    margin: 0 0.5rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 5px;
    padding-top: 5px;
}

.dropdown-menu a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin: 0 !important;
    font-weight: normal;
}

.dropdown-menu a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

.dropdown-menu {
    transition-delay: 0s;
}

.dropdown:not(:hover) .dropdown-menu {
    transition-delay: 0.3s;
}

/* Info Sections & Boxes */
.info-section,
.info-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-section {
    margin-bottom: 30px;
    border: none;
}

.info-box {
    margin-top: 20px;
    margin-bottom: 0;
}

.info-section h4,
.info-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.info-section h4 {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.info-box ul {
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
}

/* Help Text */
.help-text {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 1.5em;
    padding: 10px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 85%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-success { 
    background-color: #28a745; 
    color: #fff; 
}

.badge-warning { 
    background-color: #ffc107; 
    color: #212529; 
}

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

/* Text Utilities */
.text-success { 
    color: #28a745; 
    font-weight: 600; 
}

.text-danger { 
    color: #dc3545; 
    font-weight: 600; 
}

/* Button Variants */
.button.success {
    background-color: #28a745;
}

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

.button.secondary {
    background-color: #6c757d;
}

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

.button.alert {
    background-color: #dc3545;
}

.button.alert:hover {
    background-color: #c82333;
}

/* Property Group Collapsible Headers (PropertiesRenters) */
.property-group-header {
    margin-top: 20px;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-left: 4px solid #007bff;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-group-header:hover {
    background-color: #e9ecef;
}

.property-group-header .toggle-icon {
    transition: transform 0.3s ease;
    font-weight: bold;
    font-size: 18px;
}

.property-group-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.property-group-content {
    max-height: 5000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.property-group-content.collapsed {
    max-height: 0;
}

/* Position Rows (Bulk Add Forms) */
.position-row {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

/* Totals Section (Bulk Add Forms) */
.totals-section {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.totals-section h4 {
    margin-bottom: 15px;
    margin-top: 0;
}
