/* Broom Exchange Frontend Styles */
.broom-market-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.broom-market-status {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.status-open {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-closed {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-frozen {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.broom-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.broom-product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.broom-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.broom-product-card h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
}

.broom-brand {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
}

.broom-price {
    font-size: 1.5em;
    color: #007bff;
    font-weight: bold;
    margin: 10px 0;
}

.broom-quantity {
    color: #666;
    margin: 10px 0;
}

.broom-buy-button {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    transition: background 0.3s ease;
}

.broom-buy-button:hover:not(:disabled) {
    background: #218838;
}

.broom-buy-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.broom-no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1em;
    grid-column: 1 / -1;
}

/* Brand Dashboard Styles */
.broom-brand-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.brand-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.brand-info h3 {
    margin-top: 0;
    color: #333;
}

.broom-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.broom-tab-link {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    color: #666;
    transition: all 0.3s ease;
}

.broom-tab-link:hover {
    color: #007bff;
}

.broom-tab-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: bold;
}

.broom-tab-content {
    display: block;
}

.broom-products-table,
.broom-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.broom-products-table th,
.broom-products-table td,
.broom-orders-table th,
.broom-orders-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.broom-products-table th,
.broom-orders-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.broom-update-rate,
.broom-update-quantity {
    background: #007bff;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
    margin-right: 5px;
    transition: background 0.3s ease;
}

.broom-update-rate:hover,
.broom-update-quantity:hover {
    background: #0056b3;
}

.broom-add-product {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
}

.broom-add-product:hover {
    background: #218838;
}

/* Modal Styles */
.broom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.broom-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.broom-modal-content h3 {
    margin-top: 0;
    color: #333;
}

.broom-form-group {
    margin-bottom: 20px;
}

.broom-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.broom-form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.broom-form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.broom-modal-close {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
}

.broom-modal-close:hover {
    background: #545b62;
}

/* Login/Access Messages */
.broom-login-required,
.broom-unauthorized,
.broom-brand-pending {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
}

.broom-login-required h3,
.broom-unauthorized h3,
.broom-brand-pending h3 {
    margin-top: 0;
    color: #333;
}

.broom-login-required .button,
.broom-unauthorized .button,
.broom-brand-pending .button {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
}

.broom-login-required .button:hover,
.broom-unauthorized .button:hover,
.broom-brand-pending .button:hover {
    background: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .broom-products-grid {
        grid-template-columns: 1fr;
    }
    
    .broom-products-table,
    .broom-orders-table {
        display: block;
        overflow-x: auto;
    }
    
    .broom-tabs {
        flex-wrap: wrap;
    }
    
    .broom-tab-link {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
}