/* ======================================================= */
/* PISTON TRIBE: CREATE REVIEW PAGE STYLES                 */
/* ======================================================= */

/* --- HERO STYLES (Small & Black) --- */
.pt-home-hero.outdoor-hub-hero {
    height: 200px;  /* Much smaller fixed height */
    min-height: auto; /* Remove the old large min-height */
    max-height: none;
    position: relative;
    width: 100%;
    
    /* Force Black Background & Remove Image */
    background-color: #000 !important; 
    background-image: none !important; 
    
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

/* Hide the overlay since we have a solid black background now */
.pt-home-hero .pt-overlay {
    display: none;
}

.pt-hero-content {
    position: relative; 
    z-index: 2; 
    text-align: center; 
    color: #fff; /* White Text */
    padding: 0 20px;
}

.pt-home-title.outdoor-title {
    font-size: 36px; /* Reduced from 54px to fit smaller height */
    font-weight: 900; 
    text-transform: uppercase; 
    margin-bottom: 5px; 
    line-height: 1.1;
    color: #fff;
}

.pt-hero-subtitle {
    font-size: 16px; /* Reduced from 20px */
    color: #ccc; 
    font-weight: 500;
    margin: 0;
}

/* --- LAYOUT WRAPPER --- */
.pt-reviews-wrapper {
    background: #fff;
    padding: 60px 0;
}
.pt-create-review-layout {
    max-width: 800px; 
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* --- CONTEXT BOX (UPDATED) --- */
.pt-context-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    flex-wrap: wrap;
    gap: 20px;
}
.pt-review-author-box { display: flex; align-items: center; gap: 15px; }
.pt-avatar img { 
    width: 70px;          /* Display size */
    height: 70px;         /* Display size */
    border-radius: 50%; 
    display: block; 
    object-fit: contain;    /* Prevents stretching */
}
.pt-author-label { font-size: 11px; text-transform: uppercase; color: #777; font-weight: 700; display: block; }
.pt-author-name { margin: 0; font-size: 16px; font-weight: 700; color: #000; }

/* Swapped Product Layout */
.pt-review-product-box { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    
    /* Swap text alignment to left */
    text-align: left; 
    
    /* Swap visual order: Image (left) -> Text (right) */
    flex-direction: row-reverse; 
}

.pt-product-thumb img { width: 70px; height: auto; border-radius: 4px; border: 1px solid #ddd; }
.pt-reviewing-text { font-size: 11px; text-transform: uppercase; color: #777; font-weight: 700; display: block; }
.pt-product-title { margin: 0; font-size: 16px; font-weight: 800; color: #000; text-transform: uppercase; }

/* --- FORM STYLES --- */
.pt-form-group { margin-bottom: 30px; }
.pt-label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 10px; color: #000; text-transform: uppercase; letter-spacing: 0.5px; }

.pt-input, .pt-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    background: #fff;
    font-size: 16px;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.pt-input:focus, .pt-textarea:focus { border-color: #000; outline: none; }
.pt-textarea { height: 150px; resize: vertical; }

/* --- STAR RATING (UPDATED: SHARP SHAPE) --- */
.pt-star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 8px;
}
.pt-star-rating input { display: none; }
.pt-star-rating label {
    /* Define Star Size */
    width: 32px;
    height: 32px;
    
    /* Geometric Clip Path for sharp stars */
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0; /* Hide text characters */
}
.pt-star-rating input:checked ~ label,
.pt-star-rating label:hover,
.pt-star-rating label:hover ~ label { 
    background-color: #FFA200; /* Brand Color */
}

/* --- UPLOAD --- */
#file-upload-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    margin-top: 10px; 
    align-items: flex-start; /* Aligns tops perfectly */
}

#uploaded-thumbnails {
    display: contents;
}

/* 1. UPLOAD BOX */
.pt-upload-box {
    width: 90px !important; 
    height: 90px !important;
    box-sizing: border-box;
    border: 2px dashed #ccc;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 4px;
    transition: 0.3s;
    background: #fafafa;
    flex-shrink: 0;
}
.pt-upload-box:hover { border-color: #000; background: #fff; }
.pt-plus-icon { font-size: 30px; color: #aaa; }

/* 2. THUMBNAIL WRAPPER */
.thumbnail-wrapper {
    width: 90px !important; 
    height: 90px !important; 
    box-sizing: border-box; 
    position: relative;
    overflow: visible; /* Essential for the X to hang out */
    border: 2px solid #ddd; /* We keep the border here */
    border-radius: 4px;
    flex-shrink: 0;
    background: #fff;
    margin: 0; /* Reset any potential margins */
}

/* 3. IMAGE OVERRIDE */
#uploaded-thumbnails .thumbnail-wrapper img, 
#uploaded-thumbnails .thumbnail-wrapper video { 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: contain !important; 
    
    /* Remove Elementor's border so we don't get double borders */
    border: none !important; 
    
    /* Ensure no padding/margin messes up the fit */
    padding: 0 !important;
    margin: 0 !important;
    
    border-radius: 2px !important; 
    display: block !important;
}

/* 4. EXIT ICON */
.delete-icon {
    position: absolute; 
    top: -8px; 
    right: -8px; 
    background: #d00; 
    color: #fff;
    width: 22px; 
    height: 22px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; 
    font-size: 12px; 
    font-weight: bold;
    border-radius: 50%;
    z-index: 100; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    line-height: 1;
}
.pt-helper-text { font-size: 13px; color: #666; margin-top: 10px; }
.pt-error-text { color: #d00; font-size: 13px; font-weight: 700; margin-top: 5px; }

/* --- BUTTON --- */
.review-button {
    width: 100%; padding: 18px; font-size: 16px;
    background: #000; color: #fff; border: none; 
    font-weight: 800; text-transform: uppercase; cursor: pointer;
    transition: background 0.3s;
}
.review-button:hover,
.review-button:focus,
.review-button:active { 
    background: #333; 
    color: #fff !important; 
    outline: none; /* Removes the default blue browser border */
}

/* --- ERROR BOX --- */
.pt-error-box { text-align: center; padding: 40px; background: #fff0f0; border: 1px solid #ffcaca; border-radius: 8px; }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .pt-home-title.outdoor-title { font-size: 36px; }
    .pt-hero-subtitle { font-size: 16px; }
    
    /* Added Mobile Padding */
    .pt-create-review-layout { padding-left: 20px; padding-right: 20px; }

    /* Stack context box vertically */
    .pt-context-box { flex-direction: column; align-items: flex-start; }

    /* Fix Product Box on Mobile */
    .pt-review-product-box { 
        width: 100%; 
        
        /* Ensure Image is Left, Text is Right on mobile too */
        flex-direction: row-reverse; 
        justify-content: flex-end; /* Aligns content to the start (left) */
        
        text-align: left; 
        border-top: 1px solid #eee; 
        padding-top: 20px; 
    }
    
    .pt-product-details { text-align: left; }
}