/**
 * METFI Review Images - Styles
 */

/* Review Images Gallery */
.comment-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
    padding: 0;
}

.comment-image-link {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e5e5;
    transition: all 0.2s ease;
    cursor: pointer;
}

.comment-image-link:hover {
    border-color: #333;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comment-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.metfi-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.metfi-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.metfi-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

.metfi-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metfi-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.metfi-lightbox-loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: metfi-spin 0.8s linear infinite;
}

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

.metfi-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    padding: 5px 15px;
    line-height: 1;
    transition: all 0.2s;
    opacity: 0.8;
}

.metfi-lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.metfi-lightbox-prev,
.metfi-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 20px 18px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    opacity: 0.7;
}

.metfi-lightbox-prev:hover,
.metfi-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.metfi-lightbox-prev { left: -80px; }
.metfi-lightbox-next { right: -80px; }

.metfi-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

/* Email Verification Step */
#metfi-email-step {
    padding: 10px 0;
}

.metfi-email-intro {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.metfi-email-field {
    margin-bottom: 12px;
}

.metfi-email-field input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.metfi-email-field input[type="email"]:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

.metfi-email-error {
    color: #c0392b;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fdf0ef;
    border-radius: 4px;
    border-left: 3px solid #c0392b;
}

.metfi-email-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* Upload Zone */
.review-upload-section {
    margin: 15px 0;
}

.review-upload-section .form-label {
    margin-bottom: 8px;
    display: block;
}

.review-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    min-height: 80px;
}

.review-upload-zone.dragover {
    border-color: #333;
    background: #f8f8f8;
}

.review-upload-placeholder {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #888;
    padding: 10px;
}

.review-upload-placeholder:hover {
    color: #333;
}

.review-upload-icon {
    font-size: 28px;
    line-height: 1;
}

.review-upload-placeholder small {
    font-size: 11px;
    color: #aaa;
}

.review-upload-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.review-preview-thumb {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e5e5e5;
}

.review-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.review-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.review-preview-remove:hover {
    background: rgba(200,0,0,0.8);
}

/* Responsive */
@media (max-width: 991px) {
    .metfi-lightbox-prev { left: 10px; }
    .metfi-lightbox-next { right: 10px; }
}

@media (max-width: 767px) {
    .comment-image-link {
        width: 70px;
        height: 70px;
    }
    .metfi-lightbox-prev,
    .metfi-lightbox-next {
        padding: 15px 12px;
        font-size: 20px;
    }
    .metfi-lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 32px;
    }
    .metfi-lightbox-counter {
        bottom: 20px;
    }
}

/* Form validation error message */
.metfi-form-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 13px;
}
