/*
 * Eduhol Mağaza — Ürün değerlendirme, beğeni ve yorum arayüzü
 * Kanonik StoreCatalog.css dosyasına dokunmadan ek katman olarak yüklenir.
 */

.edu-store-interactions,
.edu-store-interactions * {
    box-sizing: border-box;
}

.edu-store-interactions {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    background:
        linear-gradient(
            180deg,
            #fff 0%,
            #fffafa 100%
        );
}

.edu-store-interaction-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.75rem;
  
    background-color: #fff;
}

.edu-store-interaction-header > div {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.52rem;
}

.edu-store-interaction-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    color: #fff;
    border: 1px solid #e36758;
    border-radius: 0.5rem;
    background:
        linear-gradient(
            135deg,
            #f17565 0%,
            #ea6252 100%
        );
    box-shadow: 0 6px 14px rgba(241, 117, 101, 0.22);
    font-size: 1rem;
}

.edu-store-interaction-header h2 {
    margin: 0 0 0.5rem;
    color: #333;
  
}

.edu-store-interaction-header p {
    margin: 0.12rem 0 0;
    color: #7c7c7c;
    font-size: 16px;
    line-height: 1.4;
}

.edu-store-verified-purchase-badge {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.25rem;
    padding: 0.3rem 0.46rem;
    color: #238a54;
    border: 1px solid rgba(46, 204, 113, 0.28);
    border-radius: 999px;
    background-color: #edfff5;
    font-size: 0.6rem;
    font-weight: 750;
}

.edu-store-verified-purchase-badge i {
    color: #2ecc71;
}

/* İlk yükleme */
.edu-store-interaction-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    gap: 0.28rem;
    padding: 1rem;
    color: #777;
}

.edu-store-interaction-loading > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #f17565;
    animation: eduStoreInteractionPulse 1s infinite ease-in-out;
}

.edu-store-interaction-loading > span:nth-child(2) {
    animation-delay: 0.14s;
}

.edu-store-interaction-loading > span:nth-child(3) {
    animation-delay: 0.28s;
}

.edu-store-interaction-loading p {
    margin: 0 0 0 0.35rem;
    font-size: 0.66rem;
}

@keyframes eduStoreInteractionPulse {
    0%,
    80%,
    100% {
        opacity: 0.35;
        transform: scale(0.72);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.edu-store-interaction-content {
    width: 100%;
}

/* Puan ve metrik özeti */
.edu-store-review-summary {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 0.6rem;
    padding: 0.65rem;
    border-bottom: 10px solid rgb(239, 239, 239);
    
}

.edu-store-score-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 142px;
    padding: 0.65rem;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 0.52rem;
    background-color: #fff;
    box-shadow: 0 5px 14px rgba(40, 25, 25, 0.05);
}

.edu-store-score-card > span {
    color: #777;
    font-size: 16px;
    font-weight: 650;
}

.edu-store-score-card > strong {
    margin-top: 0.12rem;
    color: #333;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.edu-store-summary-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    min-height: 20px;
    margin-top: 0.34rem;
    color: #f5a623;
    font-size: 0.82rem;
}

.edu-store-score-card > small {
    margin-top: 0.28rem;
    color: #8a8a8a;
    font-size: 0.58rem;
    text-align: center;
}

.edu-store-review-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.48rem;
}

.edu-store-review-metrics > div {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-width: 0;
    padding: 0.55rem 0.35rem;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 0.5rem;
    background-color: #fff;
    text-align: center;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease;
}

.edu-store-review-metrics > div:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(40, 25, 25, 0.07);
}

.edu-store-review-metrics span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #f17565;
    border-radius: 50%;
    background-color: #fff0ed;
    font-size: 16px;
}

.edu-store-review-metrics strong {
    margin-top: 0.24rem;
    color: #333;
    font-size: 16px;
    font-weight: 800;
}

.edu-store-review-metrics small {
    margin-top: 0.05rem;
    color: #888;
    font-size: 16px;
}

/* Satın alma erişimi uyarısı */
.edu-store-interaction-access {
    display: flex;
    align-items: flex-start;
    gap: 0.52rem;
    margin: 0.65rem;
    padding: 0.62rem;
    color: #6f5a27;
    border: 1px solid #f0d68c;
    border-radius: 0.48rem;
    background:
        linear-gradient(
            135deg,
            #fff9e7 0%,
            #fff4d3 100%
        );
}

.edu-store-interaction-access > i {
    flex: 0 0 auto;
    margin-top: 0.05rem;
    color: #e5a80a;
    font-size: 1rem;
}

.edu-store-interaction-access strong,
.edu-store-interaction-access p {
    display: block;
}

.edu-store-interaction-access strong {
    color: #6a5120;
    font-size: 0.69rem;
}

.edu-store-interaction-access p {
    margin: 0.12rem 0 0;
    font-size: 0.62rem;
    line-height: 1.45;
}

/* Yıldız ve beğeni aksiyonları */
.edu-store-buyer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.8fr);
    gap: 0.55rem;
    padding: 0.65rem 0.65rem 0;
}

.edu-store-rating-action,
.edu-store-like-action {
    min-width: 0;
    min-height: 76px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.52rem;
    background-color: #fff;
}

.edu-store-rating-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.6rem;
}

.edu-store-rating-action > div:first-child span,
.edu-store-rating-action > div:first-child small {
    display: block;
}

.edu-store-rating-action > div:first-child span {
    color: #333;
    font-size: 16px;
    font-weight: 750;
}

.edu-store-rating-action > div:first-child small {
    margin-top: 0.1rem;
    color: #888;
    font-size: 0.58rem;
    line-height: 1.35;
}

.edu-store-rating-buttons {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.16rem;
}

.edu-store-rating-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 31px !important;
    height: 31px;
    min-height: 31px !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #d7d7d7 !important;
    border: 1px solid #dedede !important;
    border-radius: 0.38rem !important;
    background-color: #fafafa !important;
    box-shadow: none !important;
    cursor: pointer;
    font-size: 0.86rem !important;
    transition:
        color 0.15s ease,
        border-color 0.15s ease,
        background-color 0.15s ease,
        transform 75ms ease;
}

.edu-store-rating-buttons button:hover,
.edu-store-rating-buttons button.is-hovered,
.edu-store-rating-buttons button.is-selected {
    color: #f5a623 !important;
    border-color: #f2c065 !important;
    background-color: #fff8e8 !important;
}

.edu-store-rating-buttons button:active {
    transform: scale(0.94);
}

.edu-store-rating-buttons button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.edu-store-like-action {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    width: 100% !important;
    min-height: 76px !important;
    gap: 0.5rem;
    margin: 0 !important;
    padding: 0.58rem !important;
    color: #444 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    background-color: #fff !important;
    box-shadow: none !important;
    text-align: left;
    cursor: pointer;
}

.edu-store-like-action > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #f17565;
    border-radius: 50%;
    background-color: #fff0ed;
    font-size: 1rem;
}

.edu-store-like-action strong,
.edu-store-like-action small {
    display: block;
}

.edu-store-like-action strong {
    color: #333;
    font-size: 16px;
}

.edu-store-like-action small {
    margin-top: 0.08rem;
    color: #888;
    font-size: 0.56rem;
    line-height: 1.35;
}

.edu-store-like-action:hover {
    border-color: rgba(241, 117, 101, 0.42) !important;
    background-color: #fffafa !important;
}

.edu-store-like-action.is-liked {
    border-color: rgba(241, 117, 101, 0.55) !important;
    background:
        linear-gradient(
            135deg,
            #fff7f5 0%,
            #fff0ed 100%
        ) !important;
}

.edu-store-like-action.is-liked > span {
    color: #fff;
    background-color: #f17565;
}

.edu-store-like-action:disabled {
    cursor: wait;
    opacity: 0.62;
}

/* Yorum düzenleyici */
.edu-store-comment-editor {
    margin: 0.55rem 0.65rem 0;
    padding: 0.62rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.52rem;
    background-color: #fff;
}

.edu-store-comment-editor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.edu-store-comment-editor-head > div {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.42rem;
}

.edu-store-editor-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    color: #f17565;
    border-radius: 0.38rem;
    background-color: #fff0ed;
}

.edu-store-comment-editor-head strong,
.edu-store-comment-editor-head small {
    display: block;
}

.edu-store-comment-editor-head strong {
    color: #333;
    font-size: 16px;
}

.edu-store-comment-editor-head small {
    margin-top: 0.06rem;
    color: #888;
    font-size: 0.56rem;
}

.edu-store-comment-delete {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 32px !important;
    gap: 0.25rem;
    margin: 0 !important;
    padding: 0 0.48rem !important;
    color: #d44f44 !important;
    border: 1px solid rgba(212, 79, 68, 0.22) !important;
    border-radius: 0.32rem !important;
    background-color: #fff4f2 !important;
    box-shadow: none !important;
    font-size: 0.6rem !important;
    cursor: pointer;
}

.edu-store-comment-delete:hover {
    background-color: #ffe9e5 !important;
}

.edu-store-comment-editor textarea {
    width: 100%;
    min-height: 104px;
    margin-top: 0.5rem;
    padding: 0.58rem;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 0.38rem;
    outline: 0;
    background-color: #fff;
    font: inherit;
    font-size: 16px;
    line-height: 1.48;
    resize: vertical;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.edu-store-comment-editor textarea:focus {
    border-color: #f17565;
    box-shadow: 0 0 0 0.14rem rgba(241, 117, 101, 0.14);
}

.edu-store-comment-editor-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.45rem;
}

.edu-store-comment-editor-foot > span {
    color: #929292;
    font-size: 0.57rem;
}

.edu-store-comment-save {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 36px !important;
    gap: 0.3rem;
    margin: 0 !important;
    padding: 0 0.62rem !important;
    color: #fff !important;
    border: 1px solid #e36555 !important;
    border-radius: 0.32rem !important;
    background:
        linear-gradient(
            135deg,
            #f17565 0%,
            #eb6555 100%
        ) !important;
    box-shadow: 0 5px 12px rgba(241, 117, 101, 0.18) !important;
    font-size: 0.62rem !important;
    font-weight: 750 !important;
    cursor: pointer;
}

.edu-store-comment-save:hover {
    background:
        linear-gradient(
            135deg,
            #ed6b5b 0%,
            #e85e4e 100%
        ) !important;
}

.edu-store-comment-save:disabled {
    cursor: wait;
    opacity: 0.58;
}

/* Yorum başlığı */
.edu-store-comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-top: 0.7rem;
    padding: 0.62rem 0.65rem 0.48rem;
   
}

.edu-store-comments-head h3 {
    margin: 0;
    color: #333;
    
}

.edu-store-comments-head p {
    margin: 0.1rem 0 0;
    color: #888;
    font-size: 16px;
}

.edu-store-comments-head > span {
    flex: 0 0 auto;
    padding: 0.55rem 1.92rem;
    color: #f17565;
    border-radius: 999px;
    background-color: #fff0ed;
    font-size: 16px;
    font-weight: 700;
}

/* Yorum listesi */
.edu-store-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
    padding: 0 0.65rem 0.65rem;
}

.edu-store-comment-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.48rem;
    min-width: 0;
    padding: 0.58rem;
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 0.48rem;
    background-color: #fff;
}

.edu-store-comment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    color: #fff;
   
    border-radius: 50%;
    background:
        linear-gradient(
            135deg,
            #f17565 0%,
            #e95d4d 100%
        );
    font-size: 0.75rem;
    font-weight: 750;
}

.edu-store-comment-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.edu-store-comment-main {
    min-width: 0;
    margin-left:20px;
}

.edu-store-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.edu-store-comment-author {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.22rem;
}

.edu-store-comment-author strong {
    overflow: hidden;
    color: #333;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edu-store-comment-author i {
    flex: 0 0 auto;
    color: #2980b9;
    font-size: 0.65rem;
}

.edu-store-comment-meta > time {
    flex: 0 0 auto;
    color: #999;
    font-size: 0.54rem;
}

.edu-store-comment-body {
    margin: 0.35rem 0 0;
    color: #555;
    font-size: 16px;
    line-height: 1.52;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.edu-store-comment-edited {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    margin-top: 0.3rem;
    color: #999;
    font-size: 0.52rem;
}

.edu-store-official-response {
    position: relative;
    margin-top: 0.5rem;
    padding: 0.52rem 0.55rem 0.52rem 0.68rem;
    overflow: hidden;
    border: 1px solid rgba(41, 128, 185, 0.18);
    border-radius: 0.42rem;
    background:
        linear-gradient(
            135deg,
            #f5fbff 0%,
            #eef8ff 100%
        );
}

.edu-store-official-response::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background-color: #2980b9;
    content: "";
}

.edu-store-official-response header {
    display: flex;
    align-items: center;
    gap: 0.26rem;
}

.edu-store-official-response header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #fff;
    border-radius: 0.3rem;
    background-color: #f17565;
    font-size: 0.6rem;
    font-weight: 750;
}

.edu-store-official-response header strong {
    color: #246b97;
    font-size: 0.61rem;
}

.edu-store-official-response header i {
    color: #2980b9;
    font-size: 0.63rem;
}

.edu-store-official-response p {
    margin: 0.3rem 0 0;
    color: #4d6574;
    font-size: 0.61rem;
    line-height: 1.48;
    white-space: pre-wrap;
}

.edu-store-comments-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 155px;
    margin: 0 0.65rem 0.65rem;
    padding: 1rem;
    color: #888;
    border: 1px dashed rgba(0, 0, 0, 0.16);
    border-radius: 0.48rem;
    background-color: #fafafa;
    text-align: center;
}

.edu-store-comments-empty > i {
    color: #f17565;
    font-size: 1.65rem;
}

.edu-store-comments-empty strong {
    margin-top: 0.35rem;
    color: #555;
    font-size: 16px;
}

.edu-store-comments-empty p {
    margin: 0.15rem 0 0;
    font-size: 16px;
}

.edu-store-comments-more {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: calc(100% - 1.3rem) !important;
    min-height: 38px !important;
    gap: 0.28rem;
    margin: 0 0.65rem 0.65rem !important;
    padding: 0 0.6rem !important;
    color: #f17565 !important;
    border: 1px solid rgba(241, 117, 101, 0.38) !important;
    border-radius: 0.36rem !important;
    background-color: #fff8f6 !important;
    box-shadow: none !important;
    font-size: 0.61rem !important;
    font-weight: 750 !important;
    cursor: pointer;
}

.edu-store-comments-more:hover {
    background-color: #fff0ed !important;
}

.edu-store-comments-more:disabled {
    cursor: wait;
    opacity: 0.55;
}

/* Bildirim */
.edu-store-interaction-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 99999999;
    display: flex;
    align-items: flex-start;
    max-width: min(360px, calc(100vw - 2rem));
    gap: 0.42rem;
    padding: 0.62rem 0.7rem;
    color: #fff;
    border-radius: 0.42rem;
    background-color: #333;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
    font-size: 0.65rem;
    line-height: 1.4;
}

.edu-store-interaction-toast.is-success {
    background-color: #239b56;
}

.edu-store-interaction-toast.is-error {
    background-color: #d84d42;
}

/* Yorum silme popup */
.edu-store-comment-delete-modal[hidden] {
    display: none;
}

.edu-store-comment-delete-modal {
    position: fixed;
    inset: 0;
    z-index: 99999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.edu-store-comment-delete-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.54);
}

.edu-store-comment-delete-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 390px;
    padding: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-top: 5px solid #f17565;
    border-radius: 0.5rem;
    background-color: #fff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.edu-store-comment-delete-dialog > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    color: #d84d42;
    border-radius: 50%;
    background-color: #fff0ed;
    font-size: 1.15rem;
}

.edu-store-comment-delete-dialog h3 {
    margin: 0.5rem 0 0;
    color: #333;
    font-size: 0.82rem;
}

.edu-store-comment-delete-dialog p {
    margin: 0.28rem 0 0;
    color: #777;
    font-size: 0.62rem;
    line-height: 1.48;
}

.edu-store-comment-delete-dialog > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.edu-store-comment-delete-dialog button {
    width: 100% !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 0.55rem !important;
    border-radius: 0.32rem !important;
    box-shadow: none !important;
    font-size: 0.63rem !important;
    font-weight: 750 !important;
    cursor: pointer;
}

.edu-store-comment-delete-dialog button:first-child {
    color: #666 !important;
    border: 1px solid #d5d5d5 !important;
    background-color: #fff !important;
}

.edu-store-comment-delete-dialog button:last-child {
    color: #fff !important;
    border: 1px solid #cc453b !important;
    background-color: #d84d42 !important;
}

.edu-store-comment-delete-dialog button:disabled {
    cursor: wait;
    opacity: 0.58;
}

@media (max-width: 767px) {
    .edu-store-interaction-header {
        align-items: flex-start;
    }

    .edu-store-verified-purchase-badge {
        max-width: 125px;
        white-space: normal;
        text-align: center;
    }

    .edu-store-review-summary {
        grid-template-columns: 1fr;
    }

    .edu-store-score-card {
        min-height: 128px;
    }

    .edu-store-buyer-actions {
        grid-template-columns: 1fr;
    }

    .edu-store-rating-action {
        align-items: flex-start;
        flex-direction: column;
    }

    .edu-store-rating-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .edu-store-rating-buttons button {
        width: 38px !important;
        height: 36px;
    }

    .edu-store-comment-editor-head {
        align-items: flex-start;
    }

    .edu-store-comment-delete {
        font-size: 0 !important;
    }

    .edu-store-comment-delete i {
        font-size: 0.72rem;
    }

    .edu-store-comment-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.18rem;
    }

    .edu-store-comment-delete-modal {
        align-items: flex-end;
        padding: 0;
    }

    .edu-store-comment-delete-dialog {
        max-width: none;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 0.55rem 0.55rem 0 0;
    }
}
