/* ==========================================================================
   BIK - Belediye İşletmeleri Komisyon Sistemi - Public Styles
   ========================================================================== */

/* ==========================================================================
   Form Styles
   ========================================================================== */
.bik-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.bik-form .form-row {
    margin-bottom: 20px;
}

.bik-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.bik-form .required {
    color: #ff0000;
}

.bik-form input[type="text"],
.bik-form input[type="email"],
.bik-form input[type="tel"],
.bik-form input[type="number"],
.bik-form select,
.bik-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.bik-form input[type="text"]:focus,
.bik-form input[type="email"]:focus,
.bik-form input[type="tel"]:focus,
.bik-form input[type="number"]:focus,
.bik-form select:focus,
.bik-form textarea:focus {
    border-color: #2271b1;
    outline: none;
}

.bik-form textarea {
    height: 100px;
    resize: vertical;
}

.bik-form button[type="submit"] {
    background-color: #2271b1;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.bik-form button[type="submit"]:hover {
    background-color: #135e96;
}

.bik-form button[type="submit"]:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ==========================================================================
   Message Styles
   ========================================================================== */
.bik-error,
.bik-success,
.bik-info {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid;
}

.bik-error {
    background: #f8d7da;
    color: #842029;
    border-color: #f5c2c7;
}

.bik-success {
    background: #d1e7dd;
    color: #0f5132;
    border-color: #badbcc;
}

.bik-info {
    background: #cff4fc;
    color: #055160;
    border-color: #b6effb;
}

/* ==========================================================================
   Dashboard Styles
   ========================================================================== */
.bik-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bik-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.bik-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bik-stat-box {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

.bik-stat-box:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.bik-stat-box h4 {
    margin: 0 0 10px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bik-stat-box .value {
    font-size: 28px;
    font-weight: 700;
    color: #2271b1;
    margin: 0;
}

/* ==========================================================================
   Table Styles
   ========================================================================== */
.bik-commissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
}

.bik-commissions-table th,
.bik-commissions-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

.bik-commissions-table th {
    background: #f5f5f5;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.bik-commissions-table tbody tr:hover {
    background-color: #f9f9f9;
}

.bik-commission-sale {
    color: #198754;
    font-weight: 600;
}

.bik-commission-cancel,
.bik-commission-refund {
    color: #dc3545;
    font-weight: 600;
}

/* ==========================================================================
   Business List Styles
   ========================================================================== */
.bik-business-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bik-business-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    transition: all 0.3s ease;
}

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

.bik-business-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.bik-business-info {
    margin-bottom: 10px;
    font-size: 14px;
}

.bik-business-info strong {
    display: inline-block;
    width: 80px;
    color: #666;
}

/* ==========================================================================
   Filter Form Styles
   ========================================================================== */
.bik-filter-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
}

.bik-filter-form .form-group {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 10px;
}

.bik-filter-form label {
    margin-right: 10px;
    font-weight: 600;
    font-size: 14px;
}

.bik-filter-form select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bik-filter-form button {
    background: #2271b1;
    color: white;
    border: none;
    padding: 7px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.bik-filter-form button:hover {
    background: #135e96;
}

/* ==========================================================================
   Location Map Styles
   ========================================================================== */
.bik-location-map-container {
    margin: 20px 0;
}

.bik-map-wrapper {
    width: 100%;
    height: 600px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.bik-map-controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.bik-map-search {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
    font-size: 14px;
}

.bik-map-legend {
    background: #fff;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bik-map-legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 1px solid #333;
    border-radius: 3px;
}

.legend-color.has-business {
    background-color: #4CAF50;
}

.legend-color.no-business {
    background-color: #f44336;
}

/* Leaflet Map Specific Styles */
.info.legend {
    background: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.info.legend h4 {
    margin: 0 0 8px;
    color: #555;
    font-size: 14px;
}

.info.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.8;
    border: 1px solid #999;
}

.bik-map-popup h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.bik-map-popup .business-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
}

.bik-map-popup .business-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.bik-map-popup .business-item:last-child {
    border-bottom: none;
}

.bik-map-popup .business-item a {
    color: #2271b1;
    text-decoration: none;
    margin-left: 5px;
}

.bik-map-popup .business-item a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   WooCommerce My Account Integration
   ========================================================================== */
.woocommerce-MyAccount-content .bik-form-container {
    max-width: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-content .bik-dashboard {
    max-width: none;
    margin: 0;
    padding: 0;
}

.woocommerce-bik-stat {
    background: #f8f8f8;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 3px;
    transition: box-shadow 0.3s ease;
}

.woocommerce-bik-stat:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.woocommerce-bik-stat h3 {
    margin-top: 0;
    font-size: 16px;
    color: #666;
}

.bik-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2a2a2a;
    margin: 0;
}

.bik-quick-links {
    margin-top: 30px;
}

.bik-business-info {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.bik-business-info p {
    margin: 5px 0;
}

/* Invoice Upload Form */
.bik-invoice-upload-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    border: 1px solid #e1e1e1;
}

.bik-invoice-comparison {
    margin-top: 30px;
}

.bik-year-navigation {
    margin-top: 20px;
    text-align: center;
}

.bik-year-navigation a {
    margin: 0 10px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .bik-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .bik-business-list {
        grid-template-columns: 1fr;
    }
    
    .bik-filter-form .form-group {
        display: block;
        margin-bottom: 15px;
    }
    
    .bik-commissions-table {
        font-size: 12px;
    }
    
    .bik-commissions-table th,
    .bik-commissions-table td {
        padding: 8px;
    }
    
    .bik-map-wrapper {
        height: 400px;
    }
    
    .bik-map-controls {
        flex-direction: column;
    }
    
    .bik-map-search {
        width: 100%;
    }
    
    .bik-map-legend {
        width: 100%;
    }
    
    .bik-business-info strong {
        display: block;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .bik-form-container {
        padding: 10px;
    }
    
    .bik-stat-box {
        padding: 15px;
    }
    
    .bik-stat-box .value {
        font-size: 24px;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.bik-text-center {
    text-align: center;
}

.bik-text-right {
    text-align: right;
}

.bik-mt-20 {
    margin-top: 20px;
}

.bik-mb-20 {
    margin-bottom: 20px;
}

.bik-clearfix::after {
    content: "";
    display: table;
    clear: both;
}