/* ========================================
   Refs & Feedbacks - Frontend Styles
   Palette: Bumpi Imports
   Primary #5B38ED | Hover #4928cf | Deep #3A1FB8
   Tint #D8CCFF | Dark #111518 | Gray #4d5d6d
   Bg #F3F5F7 | Border #E7EBEE | Off-white #FBFBFC
   ======================================== */

/* --- References List --- */
.refs-fb-references-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.refs-fb-reference-item {
    background: #ffffff;
    border: 1px solid #E7EBEE;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease;
}

.refs-fb-reference-item:hover {
    box-shadow: 0 8px 30px rgba(91, 56, 237, 0.1);
}

.refs-fb-reference-item__photo img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.refs-fb-reference-item__content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.refs-fb-reference-item__text {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4d5d6d;
    font-style: italic;
    border-left: 3px solid #5B38ED;
    padding-left: 1rem;
    flex: 1;
}

.refs-fb-reference-item__text p:last-child {
    margin-bottom: 0;
}

.refs-fb-reference-item__name {
    font-style: normal;
    font-weight: 700;
    color: #111518;
    display: block;
    margin-top: auto;
    font-size: 0.95rem;
}

.refs-fb-reference-item__name::before {
    content: "— ";
}

/* --- Feedback List --- */
.refs-fb-feedback-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.refs-fb-feedback-item {
    background: #FBFBFC;
    border: 1px solid #E7EBEE;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.refs-fb-feedback-item:hover {
    box-shadow: 0 8px 30px rgba(91, 56, 237, 0.08);
}

/* --- Feedback Gallery --- */
.refs-fb-feedback-item__gallery {
    position: relative;
}

.refs-fb-gallery-hero {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #E7EBEE;
}

.refs-fb-gallery-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.refs-fb-gallery-hero__counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(17, 21, 24, 0.7);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    pointer-events: none;
}

.refs-fb-gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.refs-fb-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.refs-fb-gallery-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s ease;
    opacity: 0.5;
}

.refs-fb-gallery-thumb.is-active {
    border-color: #5B38ED;
    opacity: 1;
}

.refs-fb-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.refs-fb-feedback-item__content {
    padding: 1.25rem;
}

.refs-fb-feedback-item__text {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4d5d6d;
}

.refs-fb-feedback-item__author {
    font-weight: 700;
    color: #111518;
    font-size: 0.875rem;
}

/* --- Feedback Form --- */
.refs-fb-form {
    max-width: 640px;
    margin: 1.5rem 0;
}

.refs-fb-form__field {
    margin-bottom: 1.25rem;
}

.refs-fb-form__label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111518;
    font-size: 0.95rem;
}

.refs-fb-form__required {
    color: #5B38ED;
}

.refs-fb-form__textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #E7EBEE;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    background: #ffffff;
}

.refs-fb-form__textarea:focus {
    outline: none;
    border-color: #5B38ED;
    box-shadow: 0 0 0 3px rgba(91, 56, 237, 0.12);
}

.refs-fb-form__file {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #4d5d6d;
}

.refs-fb-form__hint {
    display: block;
    font-size: 0.8rem;
    color: #4d5d6d;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* --- Upload --- */
.refs-fb-upload {
    position: relative;
}

.refs-fb-upload__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.refs-fb-upload__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.25rem;
    border: 2px dashed #D8CCFF;
    border-radius: 12px;
    background: #FBFBFC;
    color: #5B38ED;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.refs-fb-upload__button:hover {
    background: #D8CCFF;
    border-color: #5B38ED;
}

.refs-fb-upload__button svg {
    flex-shrink: 0;
}

.refs-fb-upload__hint {
    display: block;
    font-size: 0.78rem;
    color: #4d5d6d;
    opacity: 0.65;
    margin-top: 0.5rem;
}

.refs-fb-upload__error {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.refs-fb-upload__files {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.refs-fb-upload__file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F3F5F7;
    border: 1px solid #E7EBEE;
    border-radius: 8px;
    padding: 4px 10px 4px 4px;
    font-size: 0.8rem;
    color: #111518;
}

.refs-fb-upload__file-badge img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
}

.refs-fb-upload__file-badge button {
    background: none;
    border: none;
    cursor: pointer;
    color: #4d5d6d;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    margin-left: 2px;
}

.refs-fb-upload__file-badge button:hover {
    color: #991b1b;
}

.refs-fb-form__actions {
    margin-top: 1.5rem;
}

.refs-fb-form__submit {
    background: #5B38ED;
    color: #ffffff;
    border: none;
    padding: 0.875rem 2.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.refs-fb-form__submit:hover {
    background: #4928cf;
}

.refs-fb-form__submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 56, 237, 0.3);
}

/* --- Notices --- */
.refs-fb-notice {
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.refs-fb-notice p {
    margin: 0;
}

.refs-fb-notice--success {
    background: #F3F5F7;
    border: 1px solid #D8CCFF;
    color: #3A1FB8;
}

.refs-fb-notice--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.refs-fb-login-notice {
    background: #F3F5F7;
    border: 1px solid #E7EBEE;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.refs-fb-login-notice p {
    margin: 0;
    color: #4d5d6d;
}

.refs-fb-login-notice a {
    font-weight: 600;
    color: #5B38ED;
    text-decoration: underline;
}

.refs-fb-login-notice a:hover {
    color: #4928cf;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .refs-fb-references-list,
    .refs-fb-feedback-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .refs-fb-reference-item__photo img {
        height: 200px;
    }

    .refs-fb-reference-item__content {
        padding: 1rem;
    }

    .refs-fb-reference-item__text {
        font-size: 0.9rem;
    }

    .refs-fb-feedback-item__content {
        padding: 1rem;
    }

    .refs-fb-feedback-item__text {
        font-size: 0.88rem;
    }

    .refs-fb-form {
        max-width: 100%;
    }

    .refs-fb-form__submit {
        width: 100%;
        text-align: center;
    }

    .refs-fb-upload__button {
        width: 100%;
        justify-content: center;
    }

    .refs-fb-gallery-thumb {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .refs-fb-references-list,
    .refs-fb-feedback-list {
        gap: 0.75rem;
        margin: 1rem 0;
    }

    .refs-fb-reference-item,
    .refs-fb-feedback-item {
        border-radius: 12px;
    }

    .refs-fb-reference-item__photo img {
        height: 180px;
    }

    .refs-fb-reference-item__content {
        padding: 0.875rem;
    }

    .refs-fb-reference-item__text {
        font-size: 0.85rem;
        padding-left: 0.75rem;
    }

    .refs-fb-feedback-item__content {
        padding: 0.875rem;
    }

    .refs-fb-feedback-item__text {
        font-size: 0.85rem;
    }

    .refs-fb-gallery-hero__counter {
        font-size: 0.7rem;
        padding: 3px 8px;
        bottom: 6px;
        right: 6px;
    }

    .refs-fb-gallery-thumbs {
        gap: 4px;
        padding: 6px;
    }

    .refs-fb-gallery-thumb {
        width: 38px;
        height: 38px;
        border-radius: 6px;
    }

    .refs-fb-form__textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
        min-height: 100px;
    }

    .refs-fb-form__submit {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .refs-fb-upload__button {
        font-size: 0.85rem;
        padding: 0.65rem 1rem;
        border-radius: 10px;
    }

    .refs-fb-upload__file-badge {
        font-size: 0.75rem;
    }

    .refs-fb-upload__file-badge img {
        width: 28px;
        height: 28px;
    }

    .refs-fb-login-notice {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}
