/* Exports Page Specific Styles */

/* Filter Section */
.filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border: 1px solid #e9ecef;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #495057;
    min-width: 150px;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #495057;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Multi-select Dropdown */
.multi-select-dropdown {
    position: relative;
    display: inline-block;
}

.multi-select-dropdown .dropdown-toggle {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #495057;
    cursor: pointer;
    min-width: 140px;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multi-select-dropdown .dropdown-toggle:hover {
    border-color: #80bdff;
}

.multi-select-dropdown .caret {
    margin-left: 8px;
    font-size: 10px;
}

.multi-select-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 180px;
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.multi-select-dropdown .dropdown-menu.show {
    display: block;
}

.multi-select-dropdown .checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.multi-select-dropdown .checkbox-item:hover {
    background: #f0f0f0;
}

.multi-select-dropdown .checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.multi-select-dropdown .checkbox-item span {
    font-size: 14px;
    color: #495057;
}

.multi-select-dropdown .dropdown-divider {
    height: 1px;
    margin: 4px 0;
    background-color: #e9ecef;
}

.multi-select-dropdown .checkbox-all {
    background: #f8f9fa;
}

/* Filter Buttons */
.btn-filter {
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.btn-filter:hover {
    background: #0056b3;
}

/* Page specific buttons */
.btn-create {
    background: #dc3545;
    color: white;
}

.btn-create:hover {
    background: #c82333;
}

/* Page specific table styles */
th {
    background-color: #dc3545;
}

th:last-child {
    background-color: #dc3545;
}

tr:hover td:last-child,
tr:hover {
    background-color: #ffeaa7;
}

.amount { 
    text-align: right; 
    font-weight: bold; 
}

.price { 
    text-align: right; 
    color: #dc3545; 
    font-weight: bold; 
}

.note {
    max-width: 200px;
    word-wrap: break-word;
    font-style: italic;
    color: #666;
}

.type { 
    background: #28a745; 
    color: white; 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 0.9em; 
}

.type.pouch {
    background: #17a2b8; 
}

.type.chest {
    background: #d059ff; 
}

.type.web {
    background: #ffc107; 
}

.type.coindonate {
    background: #61ff88; 
}

.type.account {
    background: #334155;
}

.stats { 
    background: #ffeaa7; 
    padding: 15px; 
    border-radius: 6px; 
    margin-bottom: 20px; 
}

.quickcreate {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid #dbe8ff;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
}

.quick-create-form {
    padding: 0;
}

.quick-composer-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.quick-composer {
    position: relative;
    flex: 1;
}

.quick-composer label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
}

.quick-composer input {
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
    padding: 12px 14px;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 16px;
}

.quick-composer input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.quick-submit {
    min-height: 50px;
    padding: 12px 24px;
    white-space: nowrap;
}

.quick-customer-suggestions {
    display: none;
    position: absolute;
    z-index: 1300;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
}

.quick-customer-suggestions.show {
    display: block;
}

.quick-customer-suggestion {
    display: flex;
    width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 10px 13px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    text-align: left;
}

.quick-customer-suggestion:last-child {
    border-bottom: 0;
}

.quick-customer-suggestion:active,
.quick-customer-suggestion:hover {
    background: #eff6ff;
}

.quick-customer-suggestion-empty {
    color: #6b7280;
    font-size: 12px;
}

.quick-customer-suggestion-empty {
    padding: 14px;
}

/* Page specific form focus color */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #dc3545;
    box-shadow: 0 0 5px rgba(220,53,69,0.3);
}

/* Page specific spinner color */
.spinner {
    border-top: 4px solid #dc3545;
}

/* Mobile specific for exports */
@media (max-width: 768px) {
    .quickcreate {
        padding: 14px;
    }

    .quick-composer-row {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-submit {
        width: 100%;
        min-height: 52px;
        font-size: 16px;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: row;
        align-items: center;
    }

    .filter-group.dropdown-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group.dropdown-filter label {
        margin-bottom: 4px;
    }

    .multi-select-dropdown .dropdown-toggle {
        width: 100%;
    }

    .btn-filter,
    .btn-secondary {
        flex: 1;
    }

}

.customer-filter .filter-input {
    min-width: 240px;
}

.customer-filter-autocomplete {
    position: relative;
    min-width: 240px;
}

.customer-filter-autocomplete .filter-input {
    width: 100%;
    box-sizing: border-box;
}

.customer-filter-suggestions {
    min-width: 300px;
}

.customer-autocomplete {
    position: relative;
}

.customer-suggestions {
    display: none;
    position: absolute;
    z-index: 1200;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.customer-suggestions.show {
    display: block;
}

.customer-suggestion {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    color: #212529;
    cursor: pointer;
    text-align: left;
}

.customer-suggestion:last-child {
    border-bottom: 0;
}

.customer-suggestion:hover,
.customer-suggestion.highlighted {
    background: #e9f3ff;
}

.customer-suggestion small {
    color: #6c757d;
    font-size: 11px;
}

.customer-suggestion-empty {
    padding: 12px;
    color: #6c757d;
    font-size: 13px;
}

.field-help {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .customer-filter-autocomplete {
        flex: 1;
        min-width: 0;
    }

    .customer-filter .filter-input,
    .customer-filter-suggestions {
        min-width: 0;
        width: 100%;
    }
}
