/* İhaleler Plugin Styles */

.ihaleler-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px;
}

/* Filter Bar */
.ihaleler-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.ihaleler-search-box {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 14px;
    height: 46px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    color-scheme: light;
}

.ihaleler-search-box:focus-within {
    border-color: #153d25;
}

.ihaleler-search-box svg {
    flex-shrink: 0;
    color: #888;
}

.ihaleler-search-input {
    flex: 1;
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    height: 100%;
    background: #fff !important;
    color: #333 !important;
    padding: 0;
    color-scheme: light;
    -webkit-text-fill-color: #333;
}

.ihaleler-search-input::placeholder {
    color: #888 !important;
    opacity: 1;
    -webkit-text-fill-color: #888;
}

.ihaleler-filter-dropdown {
    position: relative;
}

.ihaleler-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    white-space: nowrap;
    transition: all 0.2s ease;
    color-scheme: light;
}

.ihaleler-filter-toggle:hover,
.ihaleler-filter-toggle.open,
.ihaleler-filter-toggle.active {
    border-color: #153d25;
    color: #153d25;
}

.ihaleler-filter-toggle .ihaleler-chevron {
    transition: transform 0.2s ease;
}

.ihaleler-filter-toggle.open .ihaleler-chevron {
    transform: rotate(180deg);
}

.ihaleler-filter-count {
    background: #153d25;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 10px;
    padding: 3px 7px;
}

.ihaleler-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff !important;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: none;
    padding: 18px;
    min-width: 280px;
    z-index: 50;
    color-scheme: light;
}

.ihaleler-filter-panel[hidden] {
    display: none;
}

.ihaleler-filter-group {
    margin-bottom: 14px;
}

.ihaleler-filter-group:last-of-type {
    margin-bottom: 0;
}

.ihaleler-filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.ihaleler-filter-select {
    width: 100%;
    padding: 8px 34px 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    background-color: #fff;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

.ihaleler-filter-select:focus {
    outline: none;
    border-color: #153d25;
}

.ihaleler-filter-select option {
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.ihaleler-filter-panel-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.ihaleler-clear-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.2s;
}

.ihaleler-clear-filters:hover {
    background: #fdf0f0;
    border-color: #d9534f;
    color: #d9534f;
}

/* List Layout */
.ihaleler-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ihale-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s;
}

.ihale-item:hover {
    border-color: #d1d5db;
}

.ihale-baslik {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.ihale-aciklama {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.ihale-aciklama p {
    margin: 0 0 8px 0;
}

.ihale-aciklama p:last-child {
    margin-bottom: 0;
}

/* Bottom Section */
.ihale-bottom-section {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Date Box */
.ihale-tarih-box {
    flex: 0 1 auto;
    border-radius: 8px;
    padding: 14px 18px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.ihale-tarih-box.devam-ediyor {
    background: #22c55e;
    border: 1.5px solid #16a34a;
}

.ihale-tarih-box.suresi-gecti {
    background: #dc2626;
    border: 1.5px solid #b91c1c;
}

.ihale-tarih-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.ihale-tarih-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    white-space: nowrap;
}

.ihale-tarih-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.ihale-tarih-value svg {
    flex-shrink: 0;
    color: #ffffff;
}

.tarih-text {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
}

.ihale-saat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-left: 8px;
    border-left: 1.5px solid rgba(255, 255, 255, 0.5);
    font-size: 14px;
    color: #ffffff;
}

.ihale-saat svg {
    width: 14px;
    height: 14px;
    color: #ffffff;
}

/* Status Badge */
.ihale-durum-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* File Button */
.ihale-dosya-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #153d25;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.ihale-dosya-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    color: #153d25;
    box-shadow: inset 0 0 0 1px #153d25;
}

.ihale-dosya-btn svg {
    flex-shrink: 0;
    color: currentColor;
}

/* No Results */
.ihaleler-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.ihaleler-no-results svg {
    color: #9ca3af;
    margin-bottom: 16px;
}

.ihaleler-no-results p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* Pagination */
.ihaleler-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0 20px;
    flex-wrap: wrap;
}

.ihaleler-pagination a,
.ihaleler-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #153d25;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
    gap: 6px;
}

.ihaleler-pagination a:hover {
    background: #153d25;
    color: #fff;
    border-color: #153d25;
    transform: translateY(-2px);
}

.ihaleler-pagination span.current {
    background: #153d25;
    color: #fff;
    border-color: #153d25;
    font-weight: 600;
}

.ihaleler-pagination span.dots {
    border: none;
    background: none;
    color: #999;
}

.ihaleler-pagination a svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ihaleler-pagination .prev,
.ihaleler-pagination .next {
    font-weight: 600;
}

.ihale-item.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ihaleler-container {
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }
    
    .ihaleler-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        margin-bottom: 16px;
        box-sizing: border-box;
    }

    .ihaleler-search-box,
    .ihaleler-filter-dropdown,
    .ihaleler-filter-toggle {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .ihaleler-filter-toggle {
        justify-content: center;
    }

    .ihaleler-filter-panel {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: 8px;
        box-sizing: border-box;
        box-shadow: none;
    }

    .ihaleler-search-input,
    .ihaleler-filter-select {
        font-size: 16px !important; /* iOS zoom önleme */
    }
    
    .ihale-item {
        padding: 16px;
    }
    
    .ihale-baslik {
        font-size: 18px;
    }
    
    .ihale-aciklama {
        font-size: 14px;
    }
    
    .ihale-bottom-section {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 16px;
    }
    
    .ihale-tarih-box {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px 14px;
    }

    /* Son katılım: mobilde dikey, taşmasız */
    .ihale-tarih-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
        min-width: 0;
    }

    .ihale-tarih-label {
        white-space: normal;
        font-size: 11px;
        letter-spacing: 0.3px;
    }

    .ihale-tarih-value {
        width: 100%;
        min-width: 0;
        flex-wrap: wrap;
        gap: 6px 10px;
        font-size: 14px;
        line-height: 1.35;
    }

    .ihale-saat {
        padding-left: 0;
        border-left: none;
        padding-top: 0;
    }

    .ihale-durum-badge {
        margin-left: 0;
        margin-top: 0;
        width: auto;
        flex: 0 0 auto;
    }
    
    .ihale-dosya-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .ihaleler-pagination {
        gap: 6px;
        margin: 20px 0;
    }
    
    .ihaleler-pagination a,
    .ihaleler-pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ihale-tarih-value {
        font-size: 13px;
        gap: 8px;
    }

    .ihale-tarih-value svg {
        width: 14px;
        height: 14px;
    }

    .ihale-durum-badge {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
