/**
 * Amigurumi Recipes WordPress Plugin
 * Frontend Styles
 */

/* === Genel Yapı === */
.amigurumi-recipes-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* === Arama Bölümü === */
.amigurumi-search-section {
    margin-bottom: 30px;
}

.amigurumi-search-form {
    position: relative;
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#amigurumi-search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s;
}

#amigurumi-search-input:focus {
    border-color: #ff6b9d;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.search-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s;
}

.search-button:hover {
    transform: scale(1.05);
}

/* Arama Önerileri */
.search-suggestions {
    margin-top: 15px;
}

.suggestions-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-tag {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.suggestion-tag:hover {
    background: #ff6b9d;
    color: white;
    border-color: #ff6b9d;
}

/* === Filtreler === */
.amigurumi-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
    color: white;
    border-color: #ff6b9d;
}

/* === Tarif Grid === */
.amigurumi-recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* === Tarif Kartı === */
.amigurumi-recipe-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.amigurumi-recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.recipe-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    background: #f5f5f5;
    overflow: hidden;
}

.recipe-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
}

.recipe-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recipe-rating .stars {
    color: #ffd700;
}

.recipe-rating .rating-value {
    color: #333;
}

.recipe-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recipe-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.recipe-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.recipe-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #888;
}

.recipe-language {
    display: flex;
    align-items: center;
    gap: 5px;
}

.recipe-link {
    display: block;
    text-align: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.recipe-link:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

/* === Pagination === */
.amigurumi-pagination {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.load-more-btn:hover {
    transform: scale(1.05);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* === Loading Spinner === */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 107, 157, 0.2);
    border-top-color: #ff6b9d;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Tek Tarif === */
.amigurumi-single-recipe {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.recipe-header {
    text-align: center;
    margin-bottom: 30px;
}

.recipe-header .recipe-title {
    font-size: 32px;
    margin-bottom: 15px;
}

.recipe-rating-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
}

.recipe-rating-large .stars {
    color: #ffd700;
}

.recipe-image-main {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
}

.recipe-image-main img {
    width: 100%;
    height: auto;
}

.recipe-content-main {
    margin-bottom: 40px;
    line-height: 1.8;
}

.recipe-documents {
    margin-bottom: 40px;
}

.recipe-documents h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.document-page {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.document-page img {
    width: 100%;
    height: auto;
    display: block;
}

.page-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}

/* Değerlendirme Özeti */
.recipe-ratings-summary {
    margin-bottom: 40px;
}

.recipe-ratings-summary h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.stars-count {
    width: 50px;
    font-weight: 600;
}

.bar-container {
    flex: 1;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #ff6b9d 0%, #c06c84 100%);
    transition: width 0.3s;
}

/* Paylaşım */
.recipe-share {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: transform 0.2s;
}

.share-btn:hover {
    transform: scale(1.05);
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25d366; }

/* === Slider === */
.amigurumi-slider {
    position: relative;
    margin-bottom: 30px;
}

.slider-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    padding-top: 40%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 30px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.slider-prev:hover,
.slider-next:hover {
    background: rgba(255, 255, 255, 1);
}

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 6px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .amigurumi-recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .recipe-header .recipe-title {
        font-size: 24px;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .amigurumi-recipes-grid {
        grid-template-columns: 1fr;
    }

    .amigurumi-filters {
        flex-direction: column;
    }
}
