/* Çevreci Komşu Kart — Modern public site styles (Tailwind companion) */

/* Loading spinner */
.loading {
    position: fixed;
    z-index: 999999999;
    height: 2em;
    width: 2em;
    overflow: visible;
    margin: auto;
    inset: 0;
}

.loading:before {
    content: '';
    display: block;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.loading:not(:required) {
    color: transparent;
    text-shadow: none;
    background-color: transparent;
    border: 0;
}

.loading:not(:required):after {
    content: '';
    display: block;
    font-size: 10px;
    width: 2.5em;
    height: 2.5em;
    margin-top: -1.25em;
    animation: ck-spinner 0.8s infinite linear;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #7fc45a;
}

@keyframes ck-spinner {
    to { transform: rotate(360deg); }
}

/* Bootstrap form/modal compatibility — modern look without bootstrap CSS */
.form-control,
select.form-control {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #1e293b;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus,
select.form-control:focus {
    outline: none;
    border-color: #7fc45a;
    box-shadow: 0 0 0 3px rgba(127, 196, 90, 0.25);
}

.form-group label,
label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 0.375rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #2e3192, #4f46e5);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 49, 146, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #7fc45a, #65a30d);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 196, 90, 0.4);
}

.btn-default {
    background: #f1f5f9;
    color: #475569;
}

.btn-default:hover {
    background: #e2e8f0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50000001;
    overflow: auto;
}

.modal.in,
.modal.show {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    padding: 1rem;
    padding-top: 5rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50000000;
}

.modal-backdrop.in,
.modal-backdrop.show {
    opacity: 1;
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    z-index: 50000002;
}

.modal-content {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc, #fff);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.modal-header .close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.modal-header .close:hover {
    color: #475569;
}

/* Carousel (duyuru) */
.carousel-inner > .item {
    display: none;
}

.carousel-inner > .item.active {
    display: block;
}

.carousel-inner img {
    width: 100%;
    border-radius: 0.5rem;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0.75rem 0 0;
    margin: 0;
}

.carousel-indicators li {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #cbd5e1;
    cursor: pointer;
    text-indent: -9999px;
    overflow: hidden;
}

.carousel-indicators li.active {
    background: #7fc45a;
    width: 1.25rem;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
}

.carousel-control.left { left: 0.5rem; }
.carousel-control.right { right: 0.5rem; }

.carousel {
    position: relative;
}

/* Tabs (Avantajlar) */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.nav-tabs > li > a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 0.75rem 0.75rem 0 0;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-tabs > li.active > a,
.nav-tabs > li > a:hover {
    color: #7fc45a;
    background: #f0fdf4;
}

.nav-tabs > li.active > a {
    border-bottom: 2px solid #7fc45a;
    margin-bottom: -2px;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .tab-pane.active {
    display: block;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.table thead th {
    background: #f8fafc;
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* Prose for CMS content */
.prose-content {
    line-height: 1.75;
    color: #334155;
}

.prose-content h1, .prose-content h2, .prose-content h3 {
    color: #1e293b;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose-content p {
    margin-bottom: 1rem;
}

.prose-content img {
    max-width: 100%;
    border-radius: 0.75rem;
}

.prose-content a {
    color: #f1592a;
    text-decoration: underline;
}

.prose-content ul, .prose-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* SweetAlert z-index fix */
.swal2-container {
    z-index: 999999999 !important;
}

.swal2-title { font-size: 1.5rem !important; }
#swal2-content { font-size: 1rem !important; }

.clear { clear: both; }
