/*
Theme Name: Ensaf
Theme URI: https://wordpress.themeholy.com/ensaf
Author: Themehour
Author URI: https://themeforest.net/user/themehour
Description: Ensaf - Law Agency WordPress Theme
Version: 1.0.0
License: GNU General Public License v2 or later 
License URI: LICENSE
Text Domain: ensaf
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
Requires at least: 5.0
Tested up to: 5.8
Requires PHP: 7.4

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others. 

*/ 

/* Header sub-menu icon */
.hide-icon.main-menu ul.sub-menu li a:before {
    display: none;
}
.hide-icon.main-menu ul.sub-menu li a:hover {
    padding-left: 0;
}

.widget.no-banner-widget {
    padding: 0;
    background-color: transparent;
    margin-bottom: 0px;
    position: relative;
    border-radius: 0px;
    border: 0px solid transparent;
}


.blog-navigation .nav-btn.next {
	display: flex;
	justify-content: end;
	width: 100%;
}

/* --- Order Received Page General Styling --- */
.woocommerce-order {
    background-color: #fcfcfc; /* ღია ფონი */
    border: 1px solid #e0e0e0; /* ნაზი საზღვარი */
    border-radius: 10px; /* მომრგვალებული კუთხეები */
    padding: 40px; /* შიდა დაშორება */
    /* box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); <-- ეს ხაზი ამოღებულია, რათა ჩრდილი არ ჰქონდეს */
}

/* --- Success Notice Styling --- */
.woocommerce-notice.woocommerce-notice--success {
    background-color: #e6ffe6; /* ღია მწვანე ფონი წარმატების შეტყობინებისთვის */
    color: #3c763d; /* მუქი მწვანე ტექსტი */
    border: 1px solid #d0ffd0; /* მწვანე საზღვარი */
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

/* --- Order Overview Styling --- */
.woocommerce-order-overview.order_details {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    display: flex; /* ფლექსბოქსი ელემენტების გასასწორებლად */
    flex-wrap: wrap; /* გადატანა ახალ ხაზზე საჭიროებისამებრ */
    gap: 20px; /* დაშორება ელემენტებს შორის */
}

.woocommerce-order-overview.order_details li {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 25px;
    flex: 1 1 calc(33% - 20px); /* 3 ელემენტი ერთ ხაზზე */
    min-width: 200px; /* მინიმალური სიგანე */
    text-align: center;
    font-size: 16px;
    color: #555;
    font-weight: 500;
}

.woocommerce-order-overview.order_details li strong {
    display: block; /* ტექსტის ახალ ხაზზე გადატანა */
    font-size: 20px;
    color: #0c2e5b;
    margin-top: 5px;
    font-weight: 700;
}

.woocommerce-order-overview.order_details li.woocommerce-order-overview__total strong,
.woocommerce-order-overview.order_details li.woocommerce-order-overview__payment-method strong {
    color: #c79355; /* ოქროსფერი ფერი სულისთვის და გადახდის მეთოდისთვის */
}

/* --- Section Titles Styling (same as checkout) --- */
.woocommerce-order-details h2.woocommerce-order-details__title,
.woocommerce-customer-details h2.woocommerce-column__title {
    color: #0c2e5b; /* მუქი ლურჯი ფერი */
    font-size: 26px; /* შედარებით დიდი ზომა */
    margin-bottom: 30px;
    font-weight: 700; /* სქელი შრიფტი */
    border-bottom: 3px solid #c79355; /* სქელი ოქროსფერი ხაზი ბოლოში */
    padding-bottom: 12px; /* ხაზსა და ტექსტს შორის დაშორება */
    text-transform: uppercase; /* დიდი ასოებით */
    letter-spacing: 0.8px; /* ასოებს შორის დაშორება */
}

/* --- Order Details Table Styling --- */
.woocommerce-table.woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden; /* Ensures border-radius applies to content */
}

.woocommerce-table.woocommerce-table--order-details thead {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.woocommerce-table.woocommerce-table--order-details th,
.woocommerce-table.woocommerce-table--order-details td {
    padding: 15px 20px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
    font-size: 15px;
    color: #333;
}

.woocommerce-table.woocommerce-table--order-details th {
    font-weight: 600;
    color: #0c2e5b;
    text-transform: uppercase;
}

.woocommerce-table.woocommerce-table--order-details td {
    font-weight: 400;
}

/* Product Name in Table */
.woocommerce-table__product-name.product-name a {
    color: #0c2e5b;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-table__product-name.product-name a:hover {
    color: #c79355;
}

.woocommerce-table__product-name.product-name strong.product-quantity {
    color: #888;
    font-size: 14px;
    margin-left: 5px;
}

/* Total in Table */
.woocommerce-table__product-total.product-total .woocommerce-Price-amount {
    font-weight: 600;
    color: #0c2e5b;
}

/* Table Footer (Totals) */
.woocommerce-table.woocommerce-table--order-details tfoot th,
.woocommerce-table.woocommerce-table--order-details tfoot td {
    border-top: 1px solid #e0e0e0;
    font-weight: 600;
    color: #0c2e5b;
    padding: 15px 20px;
}

.woocommerce-table.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table.woocommerce-table--order-details tfoot tr:last-child td {
    font-size: 18px;
    color: #c79355;
}


/* --- Customer Details / Addresses Styling --- */
.woocommerce-customer-details .woocommerce-columns.addresses {
    margin-bottom: 40px;
}

.woocommerce-customer-details .woocommerce-column.woocommerce-column--billing-address {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.woocommerce-customer-details address {
    font-style: normal; /* ნორმალური შრიფტი მისამართისთვის */
    line-height: 1.8;
    color: #555;
    font-size: 16px;
    margin-top: 20px;
}

.woocommerce-customer-details address p {
    margin-bottom: 5px;
}

.woocommerce-customer-details--phone,
.woocommerce-customer-details--email {
    font-weight: 600;
    color: #0c2e5b;
    margin-top: 15px; /* დაშორება მისამართისგან */
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .woocommerce-order {
        padding: 30px;
    }
    .woocommerce-order-overview.order_details li {
        flex: 1 1 calc(50% - 20px); /* 2 ელემენტი ერთ ხაზზე */
    }
    .woocommerce-order-details h2.woocommerce-order-details__title,
    .woocommerce-customer-details h2.woocommerce-column__title {
        font-size: 22px;
        margin-bottom: 25px;
    }
}

@media (max-width: 767px) {
    .woocommerce-order {
        padding: 20px;
        margin-top: 20px;
    }
    .woocommerce-order-overview.order_details {
        gap: 15px;
        margin-bottom: 30px;
    }
    .woocommerce-order-overview.order_details li {
        flex: 1 1 100%; /* ყველა ელემენტი ცალკე ხაზზე */
        padding: 15px 20px;
        font-size: 15px;
    }
    .woocommerce-order-overview.order_details li strong {
        font-size: 18px;
    }
    .woocommerce-order-details h2.woocommerce-order-details__title,
    .woocommerce-customer-details h2.woocommerce-column__title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    .woocommerce-table.woocommerce-table--order-details {
        display: block;
        overflow-x: auto; /* Enable horizontal scroll for table */
        white-space: nowrap; /* Prevent line breaks within cells */
    }
    .woocommerce-table.woocommerce-table--order-details thead {
        display: none; /* Hide table header on small screens */
    }
    .woocommerce-table.woocommerce-table--order-details tbody,
    .woocommerce-table.woocommerce-table--order-details tr,
    .woocommerce-table.woocommerce-table--order-details td {
        display: block;
        width: 100%;
    }
    .woocommerce-table.woocommerce-table--order-details tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
    }
    .woocommerce-table.woocommerce-table--order-details td {
        border: none;
        padding: 10px 15px;
        text-align: right; /* Align content to the right */
        position: relative;
    }
    .woocommerce-table.woocommerce-table--order-details td::before {
        content: attr(data-title) ": "; /* Show data-title as label */
        font-weight: 600;
        float: left;
        color: #0c2e5b;
        margin-right: 10px;
    }
    .woocommerce-table.woocommerce-table--order-details tfoot th,
    .woocommerce-table.woocommerce-table--order-details tfoot td {
        text-align: right;
        padding-left: 15px;
        padding-right: 15px;
    }
    .woocommerce-table.woocommerce-table--order-details tfoot th {
        float: left;
        width: auto;
    }
    .woocommerce-customer-details .woocommerce-column.woocommerce-column--billing-address {
        padding: 20px;
    }
    .woocommerce-customer-details address {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .woocommerce-order {
        padding: 15px;
    }
    .woocommerce-notice.woocommerce-notice--success {
        font-size: 16px;
        padding: 15px 20px;
    }
    .woocommerce-order-overview.order_details li {
        font-size: 14px;
        padding: 12px 15px;
    }
    .woocommerce-order-overview.order_details li strong {
        font-size: 16px;
    }
    .woocommerce-order-details h2.woocommerce-order-details__title,
    .woocommerce-customer-details h2.woocommerce-column__title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    .woocommerce-table.woocommerce-table--order-details th,
    .woocommerce-table.woocommerce-table--order-details td {
        font-size: 13px;
        padding: 10px 12px;
    }
    .woocommerce-customer-details address {
        font-size: 14px;
    }
}

/* WhatsApp Chat Widget Styles */
.whatsapp-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-icon-container {
    position: relative;
    cursor: pointer;
}

.whatsapp-icon {
    background-color: #25D366; /* WhatsApp მწვანე */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Notification dot animation */
.whatsapp-notification {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #ff0000; /* წითელი შეტყობინება */
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 1.5s infinite; /* ციმციმის ანიმაცია */
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Chat Box Styles */
.chat-box {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    width: 320px;
    height: 450px;
    position: absolute;
    bottom: 80px; /* Adjust based on icon size */
    right: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.chat-box.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background-color: #075E54; /* WhatsApp header green */
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    position: relative;
    min-height: 70px;
}

.header-avatar {
    position: relative;
    margin-right: 15px;
}

.header-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.status-indicator {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #075E54;
}

.status-indicator.online {
    background-color: #4CAF50; /* მწვანე წერტილი ხაზზე */
}

.header-info {
    flex-grow: 1;
}

.header-name {
    font-size: 18px;
    font-weight: 600;
}

.header-status {
    font-size: 12px;
    opacity: 0.8;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
    line-height: 1;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #E5DDD5; /* WhatsApp chat background */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 12px;
    border-radius: 8px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.message.received {
    background-color: #DCF8C6; /* WhatsApp received message color */
    align-self: flex-start;
    color: #333;
    border-top-left-radius: 0;
}

.message.sent {
    background-color: #DCF8C6; /* WhatsApp sent message color (can be different) */
    align-self: flex-end;
    color: #333;
    border-bottom-right-radius: 0;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
}

.chat-input-area textarea {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 15px;
    margin-right: 10px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden; /* Hide scrollbar */
    max-height: 55px; /* Limit height */
    min-height: 38px;
}

.chat-input-area button {
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.chat-input-area button:hover {
    background-color: #1DA851;
}

/* Responsive */
@media (max-width: 480px) {
    .whatsapp-chat-widget {
        bottom: 10px;
        right: 10px;
    }
    .whatsapp-icon {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
    .whatsapp-notification {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    .chat-box {
        width: 90vw; /* Use viewport width for better mobile fit */
        height: 70vh; /* Use viewport height */
        bottom: 70px;
        right: 10px;
        left: auto; /* Ensure it stays right-aligned */
        transform-origin: bottom right; /* Scale from bottom right */
    }
    .chat-header {
        padding: 10px;
    }
    .header-avatar img {
        width: 40px;
        height: 40px;
    }
    .header-name {
        font-size: 16px;
    }
    .header-status {
        font-size: 10px;
    }
    .chat-messages {
        padding: 10px;
    }
    .message {
        font-size: 13px;
        padding: 8px 10px;
    }
    .chat-input-area {
        padding: 8px;
    }
    .chat-input-area textarea {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 34px;
    }
    .chat-input-area button {
        padding: 8px 12px;
        font-size: 13px;
    }
}