/**
 * Public Styles for Atsauksmes Reviews Plugin
 */

/* ===================================
   Reviews Wrapper
   =================================== */
.atsauksmes-wrapper {
    margin: 30px 0;
    padding: 20px;
}

.atsauksmes-header {
    margin-bottom: 30px;
    text-align: center;
}

.atsauksmes-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.atsauksmes-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.rating-number {
    font-weight: 700;
    font-size: 1.3rem;
    color: #d38368;
}

.review-count {
    color: #666;
    font-size: 0.95rem;
}

/* ===================================
   Stars
   =================================== */
.stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    font-size: 1.2rem;
    line-height: 1;
}

.star.full {
    color: #ffc107;
}

.star.half {
    color: #ffc107;
    opacity: 0.5;
}

.star.empty {
    color: #ddd;
}

/* ===================================
   Reviews Grid
   =================================== */
.atsauksmes-grid {
    display: grid;
    gap: 25px;
    margin-top: 30px;
}

.atsauksmes-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.atsauksmes-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.atsauksmes-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.atsauksmes-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .atsauksmes-grid[data-columns="3"],
    .atsauksmes-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .atsauksmes-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================
   Review Item
   =================================== */
.atsauksme-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.atsauksme-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.atsauksme-header {
    margin-bottom: 15px;
}

.atsauksme-author {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.author-image {
    flex-shrink: 0;
}

.author-image img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333;
}

.review-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.review-rating .stars .star {
    font-size: 1rem;
}

.review-date {
    font-size: 0.85rem;
    color: #999;
}

.atsauksme-content {
    line-height: 1.7;
    color: #555;
}

.atsauksme-content p {
    margin: 0;
}

.atsauksmes-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* ===================================
   Form Wrapper
   =================================== */
.atsauksmes-form-wrapper {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
}

.atsauksmes-form-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 25px 0;
    color: #333;
    text-align: center;
}

/* ===================================
   Form Elements
   =================================== */
.atsauksmes-form {
    max-width: 600px;
    margin: 0 auto;
}

.atsauksmes-form-row {
    margin-bottom: 20px;
}

.atsauksmes-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.atsauksmes-form .required {
    color: #e2401c;
}

.atsauksmes-form input[type="text"],
.atsauksmes-form input[type="email"],
.atsauksmes-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.atsauksmes-form input[type="text"]:focus,
.atsauksmes-form input[type="email"]:focus,
.atsauksmes-form textarea:focus {
    outline: none;
    border-color: #d38368;
    box-shadow: 0 0 0 3px rgba(211, 131, 104, 0.1);
}

.atsauksmes-form textarea {
    resize: vertical;
    min-height: 120px;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #777;
}

/* ===================================
   Rating Input
   =================================== */
.atsauksmes-rating-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stars-wrapper {
    display: flex;
    gap: 5px;
}

.stars-wrapper .star {
    font-size: 2rem;
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s;
}

.stars-wrapper .star:hover,
.stars-wrapper .star.active {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-text {
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
}

/* ===================================
   File Input
   =================================== */
.atsauksmes-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.atsauksmes-form input[type="file"]:hover {
    border-color: #d38368;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
    border: 2px solid #e5e5e5;
}

/* ===================================
   CAPTCHA
   =================================== */
.captcha-row .captcha-question {
    display: block;
    margin: 8px 0;
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid #d38368;
}

/* ===================================
   Submit Button
   =================================== */
.atsauksmes-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: #d38368;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.atsauksmes-submit-btn:hover {
    background: #b96f56;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 131, 104, 0.3);
}

.atsauksmes-submit-btn:active {
    transform: translateY(0);
}

.atsauksmes-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===================================
   Messages
   =================================== */
.atsauksmes-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    font-weight: 600;
}

.atsauksmes-message.success {
    background: #fff3e0;
    color: #e65100;
    border: 2px solid #ff9800;
    font-weight: 600;
}

.atsauksmes-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===================================
   Loading State
   =================================== */
.atsauksmes-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.atsauksmes-form.loading .atsauksmes-submit-btn::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ===================================
   Full Page Layout
   =================================== */
.atsauksmes-full-page {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (min-width: 992px) {
    .atsauksmes-full-page {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 50px;
    }
}

/* ===================================
   Popup Button (Similar to Size Chart)
   =================================== */
.atsauksmes-button-container {
    margin: 15px 0;
    text-align: left;
    display: flex;
    justify-content: flex-start;
}

.atsauksmes-button-container.elementor-atsauksmes {
    margin: 15px 0;
}

.atsauksmes-popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    min-height: 36px;
    background-color: transparent;
    color: var(--text-color, #333);
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    width: auto;
    min-width: 140px;
}

.atsauksmes-popup-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.atsauksmes-popup-button:hover:before {
    left: 100%;
}

.atsauksmes-popup-button.c-button {
    border-width: 2px;
    border-style: solid;
    background: transparent;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.atsauksmes-popup-button.c-button--outline {
    background-color: transparent;
    border-color: #888888;
    color: #888888;
}

.atsauksmes-popup-button.c-button--outline:hover {
    background-color: black;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.atsauksmes-button-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .atsauksmes-popup-button {
        font-size: 11px;
        padding: 6px 12px;
        min-height: 32px;
        min-width: 120px;
    }
}

/* ===================================
   Tabs Widget Styles
   =================================== */
/* CRITICAL: NO z-index or position on tabs elements to avoid header conflicts */
.atsauksmes-tabs-wrapper {
    /* NO position or z-index */
    margin: 20px 0;
}

.atsauksmes-tabs-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.atsauksmes-tab-item {
    flex: 1;
}

.atsauksmes-tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.atsauksmes-tab-link:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.03);
}

.atsauksmes-tab-link.active {
    color: #d38368;
    background: #fff;
    border-bottom-color: #d38368;
}

.tab-icon {
    font-size: 1.2em;
}

.atsauksmes-tab-content {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-top: none;
    border-radius: 0 0 8px 8px;
    min-height: 300px;
}

.atsauksmes-tab-pane {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.atsauksmes-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remove title from reviews/form when in tabs */
.atsauksmes-tab-pane .atsauksmes-title,
.atsauksmes-tab-pane .atsauksmes-form-title {
    display: none;
}

/* Mobile responsive for tabs */
@media (max-width: 768px) {
    .atsauksmes-tab-link {
        padding: 12px 10px;
        font-size: 12px;
    }

    .tab-icon {
        font-size: 1em;
    }

    .atsauksmes-tab-pane {
        padding: 20px;
    }
}

/* ===================================
   Modal/Popup Styles
   =================================== */
.atsauksmes-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.atsauksmes-modal.active {
    opacity: 1;
    visibility: visible;
}

.atsauksmes-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 900px;
    max-height: 90vh;
    width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.atsauksmes-modal.active .atsauksmes-modal-content {
    transform: scale(1);
}

.atsauksmes-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9f9f9;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.atsauksmes-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.atsauksmes-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    line-height: 1;
}

.atsauksmes-close:hover {
    color: #333;
}

.atsauksmes-modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.atsauksmes-modal-form-section {
    margin-bottom: 30px;
}

.atsauksmes-divider {
    border: none;
    border-top: 2px solid #eee;
    margin: 30px 0;
}

.atsauksmes-modal-reviews-section {
    /* Reviews section in modal */
}

/* Modal reviews grid - single column */
.atsauksmes-modal .atsauksmes-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .atsauksmes-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        width: 95vw;
    }

    .atsauksmes-modal-header,
    .atsauksmes-modal-body {
        padding: 20px;
    }
}

/* ===================================
   Rating Stars Widget
   =================================== */
.atsauksmes-rating-stars-wrapper {
    display: inline-block;
}

.atsauksmes-rating-stars-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.atsauksmes-rating-stars-display {
    display: inline-flex;
    align-items: center;
}

.atsauksmes-rating-star {
    line-height: 1;
    transition: all 0.2s ease;
}

.atsauksmes-rating-star.full {
    color: #d38368;
}

.atsauksmes-rating-star.half {
    color: #d38368;
    opacity: 0.5;
}

.atsauksmes-rating-star.empty {
    color: #ddd;
}

.atsauksmes-rating-number {
    font-weight: 700;
    font-size: 1.2em;
    color: #d38368;
    line-height: 1;
}

.atsauksmes-review-count {
    color: #666;
    font-size: 0.9em;
    line-height: 1;
}

/* Mobile responsive for rating stars widget */
@media (max-width: 768px) {
    .atsauksmes-rating-stars-container {
        gap: 8px;
    }
}
