/* ============================================================
   Pet_Adoption - Modül Stilleri
   Sadece bu modülde geçerlidir, ana siteyi etkilemez.
   ============================================================ */

/* Ana kapsayıcı */
.pet-container {
    margin-left: 240px;
    margin-right: 260px;
    margin-top: 80px;
    padding: 25px;
    min-height: calc(100vh - 100px);
}

@media (max-width: 900px) {
    .pet-container {
        margin: 80px 15px 15px 15px;
    }
}

/* ============================================================
   BAŞLIK ALANI
   ============================================================ */
.pet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.pet-header h1 {
    margin: 0;
    font-size: 26px;
    color: #2c3e50;
}

.pet-header .pet-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================================
   BUTONLAR
   ============================================================ */
.pet-btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.pet-btn-primary {
    background: linear-gradient(145deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.3);
}
.pet-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.pet-btn-secondary {
    background: #3498db;
    color: white;
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}
.pet-btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.pet-btn-warning {
    background: #f39c12;
    color: white;
}
.pet-btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.pet-btn-danger {
    background: #e74c3c;
    color: white;
}
.pet-btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.pet-btn-gray {
    background: #95a5a6;
    color: white;
}
.pet-btn-gray:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* ============================================================
   UYARI KUTULARI
   ============================================================ */
.pet-alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid;
}

.pet-alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #f39c12;
}

.pet-alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #e74c3c;
}

.pet-alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #27ae60;
}

.pet-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #3498db;
}

/* ============================================================
   FİLTRE ALANI
   ============================================================ */
.pet-filters {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.pet-filters input,
.pet-filters select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.pet-filters input:focus,
.pet-filters select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}

.pet-filters button {
    grid-column: span 1;
}

/* ============================================================
   İLAN KARTLARI (Grid)
   ============================================================ */
.pet-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 25px;
}

.pet-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.pet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.pet-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #ecf0f1;
    display: block;
}

.pet-card-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
}

.pet-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pet-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.pet-card-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
    line-height: 1.5;
}

.pet-card-meta span {
    display: inline-block;
    margin-right: 10px;
}

.pet-card-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #ecf0f1;
    font-size: 11px;
    color: #95a5a6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================
   BOŞ DURUM
   ============================================================ */
.pet-empty {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #ccc;
    color: #777;
}

.pet-empty-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 15px;
}

.pet-empty h3 {
    margin: 0 0 10px 0;
    color: #555;
}

/* ============================================================
   FORMLAR
   ============================================================ */
.pet-form {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.pet-form-group {
    margin-bottom: 18px;
}

.pet-form-label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 6px;
}

.pet-form-label .required {
    color: #e74c3c;
}

.pet-form-input,
.pet-form-select,
.pet-form-textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: 0.2s;
}

.pet-form-input:focus,
.pet-form-select:focus,
.pet-form-textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}

.pet-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.pet-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .pet-form-row {
        grid-template-columns: 1fr;
    }
}

.pet-form-hint {
    font-size: 11px;
    color: #95a5a6;
    margin-top: 4px;
}

/* Checkbox grubu */
.pet-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pet-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid transparent;
    transition: 0.2s;
}

.pet-checkbox-label:hover {
    border-color: #3498db;
    background: #eaf4ff;
}

.pet-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #27ae60;
}

/* ============================================================
   İLAN DETAY
   ============================================================ */
.pet-detail {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.pet-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.pet-detail-title {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.pet-detail-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 15px 0;
}

.pet-detail-gallery img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
    background: #f5f5f5;
}

.pet-detail-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pet-detail-gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}

.pet-detail-gallery-thumbs img:hover,
.pet-detail-gallery-thumbs img.active {
    border-color: #3498db;
}

.pet-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.pet-detail-item {
    background: #f8f9fa;
    padding: 12px 14px;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.pet-detail-item .label {
    display: block;
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.pet-detail-item .value {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
}

.pet-detail-description {
    background: #f8f9fa;
    padding: 15px 18px;
    border-radius: 8px;
    line-height: 1.6;
    color: #333;
    margin: 15px 0;
    white-space: pre-wrap;
}

/* ============================================================
   ROZETLER
   ============================================================ */
.pet-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: bold;
    margin: 2px 4px 2px 0;
}

.pet-badge-yes {
    background: #d4edda;
    color: #155724;
}

.pet-badge-no {
    background: #f8d7da;
    color: #721c24;
}

.pet-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ============================================================
   SAYFALAMA
   ============================================================ */
.pet-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.pet-pagination a,
.pet-pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    color: #2c3e50;
    background: #fff;
    border: 1px solid #ddd;
    transition: 0.2s;
}

.pet-pagination a:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.pet-pagination .active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    font-weight: bold;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .pet-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pet-listings {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    
    .pet-card-image {
        height: 150px;
    }
    
    .pet-detail-title {
        font-size: 20px;
    }
}

/* ============================================================
   SAHİPLENDİRME KURALLARI MODALI
   ============================================================ */

.rules-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rules-modal {
    width: min(850px, 100%);
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rules-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
}

.rules-modal-header h2 {
    margin: 0 0 5px;
    color: #2c3e50;
}

.rules-modal-header p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.rules-modal-content {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.rules-modal-section {
    border-left: 4px solid #2c3e50;
    background: #f8f9fa;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 0 8px 8px 0;
}

.rules-modal-section h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.rules-modal-section-content {
    font-size: 13px;
    line-height: 1.65;
    color: #444;
}

.rules-modal-footer {
    padding: 18px 24px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.rules-accept-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
}

.rules-accept-label input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    cursor: pointer;
}

#continueToListing {
    width: 100%;
    opacity: .6;
    cursor: not-allowed;
}

@media (max-width: 600px) {

    .rules-modal-overlay {
        padding: 10px;
    }

    .rules-modal {
        max-height: 94vh;
        border-radius: 10px;
    }

    .rules-modal-header,
    .rules-modal-content,
    .rules-modal-footer {
        padding: 15px;
    }

    .rules-modal-header h2 {
        font-size: 19px;
    }

    .rules-modal-section h3 {
        font-size: 15px;
    }
}
