/*
 * Responsive styles for quotes
 */

/* Tablets and below */
@media (max-width: 992px) {
    .authors-grid,
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    
    .quote-card-compact {
        padding: 18px;
    }
    
    .author-image-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .author-initial {
        font-size: 20px;
    }
    
    .quote-full-text {
        font-size: 14px;
    }
    
    .quote-mark {
        font-size: 0px;
    }
    
    .quote-actions-bottom-parallel {
        gap: 12px;
        padding: 3px 6px;
        right: 15px;
        bottom: 18px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .quote-card-compact {
        flex-direction: row;
        align-items: flex-start;
        padding: 18px;
        margin-bottom: 12px;
        position: relative;
        min-height: 110px;
    }
    
    .author-image-link {
        margin-right: 15px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .author-image-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .author-initial {
        font-size: 20px;
    }
    
    .quote-content-wrapper {
        width: 100%;
        padding-right: 0;
    }
    
    .quote-text-compact {
        justify-content: flex-start;
        margin-bottom: 8px;
        width: 100%;
    }
    
    .quote-full-text {
        text-align: left;
        font-size: 14px;
        width: 100%;
        margin-right: 0;
        padding-right: 0;
    }
    
    .quote-mark {
        font-size: 1px;
        line-height: 0.7;
    }
    
    .quote-actions-bottom-parallel {
        position: absolute;
        bottom: 18px;
        right: 15px;
        gap: 12px;
        padding: 3px 6px;
        box-shadow: 0 0px 0px rgba(0,0,0,0.05);
    }
    
    .like-count-number {
        font-size: 9px !important;
    }
    
    .like-label-small {
        font-size: 9px !important;
    }
    
    .view-quote-btn-small,
    .like-btn-small,
    .share-btn-small {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .share-options {
        min-width: 140px;
        font-size: 12px;
    }
    
    .share-option {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .quote-meta {
        justify-content: flex-start;
        width: 100%;
    }
    
    .quote-tags {
        justify-content: flex-start;
        width: 100%;
    }
    
    
    
    /* Bookmarked quotes mobile */
    .bookmarked-quote-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .bookmarked-quote-content {
        margin-right: 0;
    }
    
    .bookmarked-quote-actions {
        justify-content: flex-end;
    }
}

/* Extra small mobile */
@media (max-width: 435px) {
    .quote-card-compact {
        padding: 15px;
        min-height: 100px;
    }
    
    .author-image-link {
        margin-right: 12px;
    }
    
    .author-image-wrapper {
        border: none !importnant;
        width: 45px;
        height: 45px;
    }
    
    .author-initial {
        font-size: 18px;
    }
    
    .quote-content-wrapper {
        width: 100%;
    }
    
    .quote-full-text {
        font-size: 13px;
        line-height: 1.5;
        width: 100%;
    }
    
    .quote-mark {
        font-size: 0px;
        line-height: 0.6;
    }
    
    .quote-author {
        font-size: 12px;
    }
    
    .book-reference {
        font-size: 11px;
    }
    
    .quote-tag {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .quote-actions-bottom-parallel {
        bottom: 15px;
        right: 12px;
        gap: 10px;
        padding: 2px 5px;
    }
    
    .like-count-number {
        font-size: 9px !important;
    }
    
    .like-label-small {
        font-size: 8px !important;
    }
    
    .action-buttons-small {
        gap: 4px;
    }
    
    .view-quote-btn-small,
    .like-btn-small,
    .share-btn-small {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .share-options {
        min-width: 120px;
        right: -40px;
    }
    
    .share-option {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Search box extra small */
    .searchBox--large__input {
        height: 36px !important;
        line-height: 36px !important;
        font-size: 13px !important;
        padding-right: 40px !important;
        padding-left: 12px !important;
    }
    
    .searchBox--large__input::placeholder {
        font-size: 13px !important;
    }
    
    .gr-form.gr-form--compact.gr-form--fullWidth::after {
        width: 18px !important;
        height: 18px !important;
        right: 10px !important;
    }
    
    /* Filter grids */
    .authors-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    /* Notifications mobile */
    .bookmark-notification,
    .like-notification,
    .share-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .quotes-container {
        max-width: 1400px;
    }
    
    .quote-card-compact {
        padding: 15px;
    }
    
    .author-image-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .author-initial {
        font-size: 28px;
    }
    
    .quote-full-text {
        font-size: 16px;
    }
    
    .quote-mark {
        font-size: 0px;
    }
}

/* Print styles */
@media print {
    .quote-actions-bottom-parallel,
    .bookmarked-quote-actions,
    .bookmarks-header .clear-all-bookmarks,
    .share-options,
    .search-box,
    .mediumTabs,
    .filter-section {
        display: none !important;
    }
    
    .quote-card-compact,
    .bookmarked-quote-item {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}


/*autor page*/

@media (max-width: 768px) {
    .author-header {
        flex-direction: column;
        text-align: start;
        padding: 30px 20px;
        gap: 30px;
    }
    
    .author-header-image,
    .author-archive-image.placeholder {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }
    
    .author-title {
        font-size: 32px;
    }
    
    .author-meta-details {
        flex-direction: column;
        gap: 15px;
    }
    
    .author-meta-item {
        min-width: 100%;
    }
    
    .related-authors-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}



@media (max-width: 435px)   {
.like-count-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 15px;
    }
    

    .like-count-number {
    font-size: 8px;
    font-weight: 600px;
    color: #2c3e50;
   }

.like-label-small {
    font-size: 8px;
    color: #666;
  }

  .quote-tag {
    font-size: 8px;
    color: #666;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 30px !important;
    text-decoration: none;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}



    .quote-card-compact {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    margin-left: 0px;
    margin-right: 0px;
    border: 1px solid #e9ecef;
    box-shadow: 0 0px 0px rgba(0,0,0,0);
    transition: all 0.1s ease;
    min-height: 100px;
    position: relative;
    overflow: visible;
}


}


@media (max-width: 435px) {
    .author-quotes-page {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0px;
        box-sizing: border-box;
    }
    
    .author-header {
        gap: 20px;
        padding: 10px ;
        margin-bottom: 20px;
    }

    
    .author-header-info h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .author-biography {
        padding: 10px;
        margin-top: 20px;
        margin-bottom: 30px;
    }
    
    .author-biography h3 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .author-biography p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
   .author-archive-image {
    /* Resetujte sve postojeće dimenzije */
    width: 120px !important;
    height: 120px !important;
    border: 2px solid white !important;
    min-width: unset !important;
    max-width: unset !important;
    min-height: unset !important;
    max-height: unset !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important; /* Za okruglu sliku */
}

.author-header-image {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    border: 2px solid white !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important; /* ili 10px za zaobljene uglove */
    display: block !important;
}
    
    .author-quotes-list {
        margin-top: 40px;
        padding-top: 30px;
    }
}



@media (max-width: 435px) {
   
    #quotesListSection {
    max-width: 100%;
    width: 100%;
    padding: 0px;
    }

    .quotes {
    max-width: 100%;
    width: 100%;
    padding: 0px;
    }

#quotesListSection.quotes {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

}

@media (max-width: 435px) {
    /* GLAVNI KONTEJNER - kontrolišemo širinu ovde */
    .goodreads-quotes-container,
    #quotesListSection.goodreads-quotes-container {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0px; /* OVO kontroliše prostor sa strane */
        padding-right: 0px; /* OVO kontroliše prostor sa strane */
        box-sizing: border-box;
    }
    
    /* KARTICE unutar kontejnera */
    .goodreads-quotes-container .quote-card-compact,
    #quotesListSection .quote-card-compact {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 16px;
        box-sizing: border-box;
        margin-bottom: 16px;
    }
    
    /* Ako postoji dodatni wrapper */
    .goodreads-quotes-container > div,
    .goodreads-quotes-container .quotes-list {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
}


 @media (max-width: 435px) {
  .authors-list {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 40px;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 10px !important; /* Prostor sa strane */
        padding-right: 10px !important; /* Prostor sa strane */
        box-sizing: border-box !important;
    }

     .authors-page-container.list-view {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px 5px !important; /* Smanjite padding za više prostora */
        box-sizing: border-box !important;
    }

.author-list-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.2s ease;
    gap: 20px;
}

}


@media (max-width: 435px) {
    /* Share dropdown kontejner - NE MENJAJTE OVO */
    .share-dropdown {
        position: relative;
        display: inline-block;
    }
    
    /* OVDE je ključ - kada je active klasa, proširite dropdown */
    .share-options.active {
        position: absolute;
        bottom: 100%;
        right: 0;
        left: -100px; /* Proširi se levo */
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px 0;
        min-width: 150px; /* Proširena širina */
        width: 150px;
        max-width: calc(100vw - 40px); /* Ne ide do ivice */
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        display: block; /* OVO JE VAŽNO - display: block kada je active */
        z-index: 1000;
        box-sizing: border-box;
    }
    
    /* Obican share-options (neaktivan) ostaje isti */
    .share-options:not(.active) {
        display: none;
    }
}

@media (max-width: 435px) {
    .image-preview-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.9) !important;
        cursor: pointer;
        display: grid !important; /* PROMENA: grid umesto flex */
        place-items: center !important; /* Grid centriranje */
        z-index: 99999 !important;
        padding: 20px !important;
        box-sizing: border-box !important;
    }
    
    .image-preview-container {
        position: relative !important;
        background: white !important;
        border-radius: 15px !important;
        width: auto !important;
        min-width: 280px !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
        height: auto !important;
        overflow: auto !important;
        z-index: 100000 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
        animation: modalSlideUp 0.3s ease !important;
        margin: auto !important; /* Ovo je ključno */
    }
}
    

@media (max-width: 435px) {
    #explore_search_query {
       display: none !important;
    }
 }



 @media (max-width: 435px) {
    /* 1. GLAVNA STRANICA */
    .single-quote-page {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 5px !important;
        box-sizing: border-box !important;
    }
    
    /* 2. GLAVNI KONTEJNER */
    .single-quote-container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* 3. KARTICA SA CITATOM */
    .single-quote-card {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 20px !important;
        box-sizing: border-box !important;
        border-radius: 12px !important; /* Zadržite ili podesite */
        box-shadow: 0 0px 0px rgba(0,0,0,0) !important;
    }
    
    /* 4. RESET ZA SVE UNUTRAŠNJE ELEMENTE */
    .single-quote-page *,
    .single-quote-container *,
    .single-quote-card * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}


@media (max-width: 435px) {
    /* 1. GLAVNA STRANICA - najvažnije */
    .favorite-quotes-page {
        max-width: 100vw !important;
        width: 100vw !important;
        margin: 0px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
        border-radius: 0 !important;
        min-height: 100vh !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
    }
    
    /* 2. HEADER SA STATISTIKOM */
    .favorite-quotes-header {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .favorite-quotes-header .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* 3. GLAVNI SADRŽAJ - KONTEJNER SA KARTICAMA */
    .favorite-quotes-page > .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* 4. GRID SA KARTICAMA */
    .bookmarked-quotes-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 5px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    



    /* 5. SVE KARTICE */
    .quote-card-compact.bookmarked {
       display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    margin-left: 0px;
    margin-right: 0px;
    border: 1px solid #e9ecef;
    box-shadow: 0 0px 0px rgba(0,0,0,0);
    transition: all 0.1s ease;
    min-height: 100px;
    position: relative;
    overflow: visible;
}
    
    /* 6. BOOKMARKOVANE KARTICE */
    .quote-card-compact.bookmarked {
       display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    margin-left: 0px;
    margin-right: 0px;
    border: 1px solid #e9ecef;
    box-shadow: 0 0px 0px rgba(0,0,0,0);
    transition: all 0.1s ease;
    min-height: 100px;
    position: relative;
    overflow: visible;
}




    .quote-text-compact {
        justify-content: flex-start;
        margin-bottom: 8px;
        width: 100%;
    }

     }



     @media (max-width: 435px) {
    /* POMERI AUTOR IKONICU U LEVO */
    .author-image-link {
        margin-right: 10px !important;
        margin-left: 5px !important; /* Sigurno resetuj levi margin */
        flex-shrink: 0px !important;
        position: relative !important;
        left: 0px !important; /* Sigurno postavi na 0 */
        transform: translateX(0) !important; /* Resetuj transformacije */
    }
    
    
    
    /* AKO POSTOJI BILO KAKAV MARGIN/PADDING LEVO NA RODITELJU */
    .quote-card-compact.bookmarked {
        padding-left: 0px !important; /* Dodaj padding ako treba */
        margin-left: 0px !important;
    }
    
  }