body.it-gradient-background { background: linear-gradient(45deg, #4f59f9, #c906cc); background-attachment: fixed; }
.woocommerce-account .woocommerce { background-color: transparent; padding: 20px 0; }
.iphone-mockup { margin: 60px auto; width: 390px; position: relative; z-index: 1; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.iphone-frame { background: #1c1c1e; border: 2px solid #4a4a4a; border-radius: 60px; padding: 12px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45); }
.iphone-screen { background: #fff; width: 100%; border-radius: 50px; position: relative; overflow: hidden; min-height: 600px; }
.dynamic-island { position: absolute; top: 15px; left: 50%; transform: translateX(-50%); width: 125px; height: 35px; background: #1c1c1e; border-radius: 20px; z-index: 2; }
.iphone-content, .samsung-content { padding: 60px 20px 20px; box-sizing: border-box; color: #1d1d1f; height: 100%; overflow-y: auto; position: relative; }
.iphone-content::-webkit-scrollbar { width: 5px; }
.iphone-content::-webkit-scrollbar-track { background: #f1f1f1; }
.iphone-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 5px; }
.iphone-content::-webkit-scrollbar-thumb:hover { background: #aaa; }

#it-multi-step-form { text-align: right; direction: rtl; }
.it-step { padding: 10px 0; margin-bottom: 20px; border-bottom: 1px solid #efefef; animation: fadeIn 0.5s ease-in-out; }
.it-step:last-child { border-bottom: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#it-multi-step-form h2 { font-size: 20px; font-weight: 600; color: #262626; margin-bottom: 15px; text-align: center; }
#it-multi-step-form input[type="text"],#it-multi-step-form select, #it-multi-step-form input[type="number"] { width: 100%; padding: 12px 15px !important; background-color: #fafafa; border: 1px solid #dbdbdb; border-radius: 8px; font-size: 14px; box-sizing: border-box; }
#it-multi-step-form label { display: block; font-weight: 500; color: #555; margin-top: 15px; margin-bottom: 8px; font-size: 14px; }
.it-validation-error { color: #c00; font-size: 12px; margin-bottom: 5px; margin-top: -5px; }
#it-product-description { background-color: #fffbf2; border: 3px solid #f1f1a7; padding: 15px ; margin-bottom: 15px; font-size: 14px; line-height: 1.7; color: #555; border-radius: 8px; }
#it-product-description:empty { display: none; }
#it-multi-step-form button { width: 100%; text-align: center; border-radius: 8px; padding: 12px; text-decoration: none; color: #fff; font-weight: 600; font-size: 15px; border: none; cursor: pointer; margin-top: 10px; transition: all 0.2s ease; }
#it-multi-step-form button[type="submit"] { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
#it-multi-step-form button[type="submit"]:disabled { background: #ccc; cursor: not-allowed; }
#it-invoice-details { padding: 15px; background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; margin-bottom: 15px; }
#it-invoice-details p { display: flex; justify-content: space-between; margin: 0 0 8px 0; font-size: 14px; }
#it-invoice-details hr { margin: 10px 0; border: 0; border-top: 1px solid #e9ecef; }
#it-payment-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
#it-payment-section .wc_payment_methods { padding: 0; margin: 0; list-style: none; }
#it-payment-section .wc_payment_method > label { font-size: 14px; font-weight: 500; display: inline-block; vertical-align: middle; }
#it-multi-step-form .wc_payment_method input[type="radio"] {
    -webkit-appearance: radio !important;
    appearance: radio !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    position: static !important;
    border: inherit !important;
    clip: auto !important;
    margin: 0 0 0 10px !important;
    opacity: 1 !important;
    vertical-align: middle;
}
.instagram-id-header { direction: ltr; display: flex; justify-content: space-between; align-items: center; padding: 0 5px; margin: 0 0 15px 0; }
.header-left-side, .header-right-side { display: flex; align-items: center; }
.instagram-id-header .instagram-id-text { font-size: 22px; font-weight: 600; color: #000; margin: 0 10px; }
.instagram-id-header .icon { font-size: 18px; color: #555; }
.instagram-id-header .arrow-icon { font-weight: bold; }
.order-number-badge { font-size: 14px; font-weight: 500; color: #555; background-color: #f0f0f1; padding: 5px 10px; border-radius: 8px; direction: ltr; }
.header-divider { border: 0; border-top: 1px solid #e5e5e5; margin: 0 0 30px 0; }
.order-product-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 35px; gap: 15px; }
.status-badge { display: inline-block; padding: 5px 12px; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 500; min-width: 80px; text-align: center; }
.status-badge.status-completed { background-color: #28a745; }
.status-badge.status-processing { background-color: #ffc107; color: #212529; }
.status-badge.status-cancelled, .status-badge.status-failed { background-color: #dc3545; }
.status-badge.status-on-hold, .status-badge.status-pending, .status-badge.status-refunded { background-color: #6c757d; }
.product-text-details { flex: 1; text-align: right; }
.product-title { font-size: 20px; font-weight: 600; margin: 0 0 8px 0; }
.product-image-wrapper { flex-shrink: 0; width: 100px; height: 100px; }
.product-image-wrapper img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #f5f5f7; }
.order-details-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #e5e5e5; }
.order-details-list li { display: flex; justify-content: space-between; align-items: center; padding: 18px 5px; border-bottom: 1px solid #e5e5e5; font-size: 16px; }
.order-details-list .label { font-weight: 500; color: #333; }
.order-details-list .value { font-weight: 600; color: #000; }
.order-footer-action { text-align: center; margin-top: 30px; }
.back-to-orders-button { display: inline-block; padding: 12px 25px; border-radius: 12px; text-decoration: none; font-weight: 500; font-size: 15px; cursor: pointer; border: none; color: #fff; background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); transition: opacity 0.2s ease-in-out; }
.back-to-orders-button:hover { opacity: 0.9; }
.it-auth-container { padding: 20px 0; }
.it-auth-tabs { display: flex; border-bottom: 1px solid #dbdbdb; margin-bottom: 25px; }
.auth-main-title { font-size: 18px; font-weight: 500; color: #262626; text-align: center; margin-bottom: 20px; padding: 0 15px; line-height: 1.5; }
.it-auth-tab { flex: 1; background: none; border: none; padding: 15px; font-size: 16px; font-weight: 600; color: #8e8e8e; cursor: pointer; transition: color .2s; border-bottom: 2px solid transparent; }
.it-auth-tab.active { color: #262626; border-bottom-color: #262626; }
.it-auth-content { padding: 0 10px; }
.it-auth-form .form-description { font-size: 13px; color: #8e8e8e; text-align: center; margin-bottom: 15px; line-height: 1.5; }
.it-auth-form input { width: 100%; padding: 12px; font-size: 14px; border: 1px solid #dbdbdb; background-color: #fafafa; border-radius: 6px; margin-bottom: 10px; }
.it-auth-form button { width: 100%; padding: 12px; background-color: #0095f6; color: #fff; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 10px; }
.it-auth-form button:hover { background-color: #1877f2; }
.status-msg { font-size: 13px; padding: 10px; margin-bottom: 15px; border-radius: 4px; display: none; line-height: 1.5; text-align: center; }
.status-msg.error { background: #ffebe9; border: 1px solid #ffc8c3; color: #c00; }
.status-msg.success { background: #e9f6eb; border: 1px solid #c4e5c8; color: #207427; }
.it-auth-tab-content { display: none; }
.it-auth-tab-content.active { display: block; animation: fadeIn 0.4s ease-in-out; }
@media (max-width: 480px) {
    .iphone-mockup, .samsung-mockup { width: 95vw; height: auto; aspect-ratio: 390 / 844; margin: 30px auto; box-sizing: border-box; }
    .instagram-id-header .instagram-id-text, #it-multi-step-form h2 { font-size: 22px; }
    .product-title { font-size: 16px; }
    #it-multi-step-form select, #it-multi-step-form input { font-size: 13px; padding: 12px 15px; }
    .order-details-list li, #it-multi-step-form button, .back-to-orders-button { font-size: 14px; }
    .product-image-wrapper { width: 80px; height: 80px; }
}
.it-orders-list-wrapper { padding: 10px 15px; }
.it-orders-list-wrapper h2 { font-size: 20px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.2); margin-bottom: 20px; text-align: center; }
.it-explore-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .it-explore-grid { grid-template-columns: repeat(3, 1fr); } }
.it-explore-item { display: block; position: relative; width: 100%; aspect-ratio: 1 / 1; text-decoration: none; color: #fff; transition: transform 0.2s ease, box-shadow 0.2s ease; padding: 10px; box-sizing: border-box; border-radius: 16px; background: rgba(255, 255, 255, 0.15); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1); }
.it-explore-item:hover { transform: translateY(-4px); box-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.15); }
.it-explore-item .item-content-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; text-align: center; }
.it-explore-item .item-image-wrapper { width: 50px; height: 50px; border-radius: 50%; overflow: hidden; margin-bottom: 10px; flex-shrink: 0; border: 2px solid rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.2); }
@media (min-width: 480px) { .it-explore-item .item-image-wrapper { width: 60px; height: 60px; margin-bottom: 12px; } }
.it-explore-item .item-image-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.it-explore-item .item-order-number { font-size: 14px; font-weight: 600; line-height: 1.2; }
.it-explore-item .item-order-date { font-size: 12px; color: rgba(255, 255, 255, 0.8); margin-top: 4px; }
.it-view-order-btn { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; margin-top: 12px; transition: all 0.2s ease; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.it-view-order-btn:hover { background: rgba(255, 255, 255, 0.4); }
#it-order-popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); z-index: 100000; padding: 20px; box-sizing: border-box; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); overflow-y: auto; }
#it-order-popup-container { position: relative; max-width: 420px; width: 100%; animation: popup-scale-in 0.3s ease-out; margin: 40px auto; }
@keyframes popup-scale-in { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.it-order-popup-close { position: absolute; top: -40px; right: -5px; background: transparent; border: none; color: white; font-size: 40px; line-height: 1; cursor: pointer; font-weight: 200; opacity: 0.8; transition: opacity 0.2s; padding: 0; }
.it-order-popup-close:hover { opacity: 1; }
#it-order-popup-content .iphone-mockup, #it-order-popup-content .samsung-mockup { margin: 0 auto; }
#it-order-popup-content .loading, #it-order-popup-content .error { color: white; font-size: 18px; text-align: center; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; padding: 50px 20px; }
@media (max-width: 450px) {
    #it-order-popup-container { margin: 20px auto; }
    .it-order-popup-close { top: 0; right: 5px; transform: translateY(-110%); }
}
.it-load-more-container { text-align: center; margin-top: 30px; }
#it-load-more-btn { background-color: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; padding: 10px 25px; border-radius: 12px; font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
#it-load-more-btn:hover:not(:disabled) { background-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
#it-load-more-btn:disabled { opacity: 0.7; cursor: wait; }
.samsung-mockup { margin: 60px auto; width: 350px; position: relative; z-index: 1; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.samsung-frame { background: linear-gradient(145deg, #3c3c3e, #2a2a2c); border: 2px solid #555; border-radius: 28px; padding: 8px; box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.5); }
.samsung-screen { background: #fff; width: 100%; border-radius: 20px; position: relative; overflow: hidden; min-height: 600px; }
.punch-hole-camera { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; background: #111; border-radius: 50%; z-index: 2; border: 1px solid #222; }
.samsung-mockup .iphone-content { padding-top: 50px; }
.samsung-content::-webkit-scrollbar { width: 5px; }
.samsung-content::-webkit-scrollbar-track { background: #f1f1f1; }
.samsung-content::-webkit-scrollbar-thumb { background: #ccc; border-radius: 5px; }
.samsung-content::-webkit-scrollbar-thumb:hover { background: #aaa; }
.it-custom-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-sizing: border-box;
}
.it-header-design1 {
    height: 55px;
    color: #fff;
    direction: ltr;
}
.it-header-design1 .it-header-col-left a {
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    margin-left: 5px;
}
.it-header-design1 .it-header-col-left a:last-child {
    margin-left: 0;
}
.it-header-design1 .it-header-logo img {
    max-height: 45px;
    width: auto;
        display: inline-flex;
    align-items: center;
    justify-content: center;
}
.it-footer-design1 {
    height: 80px;
    color: white;
    padding: 15px;
    text-align: center;
    box-sizing: border-box;
    font-size: 14px;
}
.it-footer-design1 a {
    color: #fff;
    text-decoration: underline;
}
.it-header-design2 {
    height: 50px;
    background: transparent;
    margin-top: 20px;
}
.it-header-design2 .it-header-icon-btn {
    background-color: rgba(0, 88, 30, .18);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    cursor: pointer;
    margin-left: 10px;
}
.it-header-design2 .it-header-icon-btn:last-child {
    margin-left: 0;
}
.it-footer-design2 {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #dbdbdb;
    z-index: 10000;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}
.it-footer-design2 .it-footer-menu-item {
    font-size: 24px;
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
.it-footer-design2 .it-footer-menu-item:hover,
.it-footer-design2 .it-footer-menu-item.active {
    color: rgba(0, 88, 30, .8);
}
.it-slide-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    max-width: 80%;
    height: 100%;
    background-color: #fff;
    z-index: 10002;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.it-slide-menu.is-open { right: 0; }
.it-slide-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.it-slide-menu-logo {
    flex-grow: 1;
    text-align: center;
    padding-right: 10px;
    margin-top: 30px;
}
.it-slide-menu-logo img {
    max-height: 40px;
    width: auto;
}
#it-slide-menu-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    color: #000;
}
.it-slide-menu-nav {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
}
.it-slide-menu-nav .it-header-menu-item {
    padding: 15px 36px;
    text-decoration: none;
    color: #5e6675;
    line-height: 2;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    position: relative;
}
.it-slide-menu-nav .it-header-menu-item:last-child {
    border-bottom: none;
}
.it-header-menu-item-icon {
    font-size: 20px;
    width: 20px;
    text-align: center;
    color: #000;
}
.it-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.it-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}
#it-a2hs-popup-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100001;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#it-a2hs-popup-overlay.visible { opacity: 1; visibility: visible; }
#it-a2hs-popup {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 25px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    direction: rtl;
    box-sizing: border-box;
}
#it-a2hs-popup-overlay.visible #it-a2hs-popup { transform: translateY(0); }
#it-a2hs-popup h3 { font-size: 18px; font-weight: 600; margin-top: 0; margin-bottom: 10px; color: #262626; }
#it-a2hs-popup p { font-size: 14px; color: #555; margin-bottom: 25px; line-height: 1.6; }
.it-a2hs-buttons { display: flex; gap: 10px; }
.it-a2hs-buttons button { flex: 1; padding: 12px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; border: none; transition: background-color 0.2s; }
#it-a2hs-accept:hover, #it-a2hs-decline:hover { opacity: 0.9; }
.it-error-box {
    background-color: #fff0f0;
    color: #c53030;
    border: 1px solid #f5c6cb;
    border-right-width: 5px;
    border-right-color: #e53e3e;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.1);
    animation: fadeIn 0.4s ease;
    text-align: right;
}
.it-error-box::before {
    font-family: "Font Awesome 5 Free";
    content: "\f071";
    font-weight: 900;
    font-size: 20px;
    margin-left: 15px;
    color: #e53e3e;
}
#it-brand-selection-page {
    animation: fadeIn 0.5s ease-in-out;
}
.it-page-title {
    font-size: 20px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 20px;
    text-align: center;
}
.it-brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}
.it-brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background-color: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    padding: 10px;
    box-sizing: border-box;
}
.it-brand-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: #c7c7c7;
}
.it-brand-image {
    width: 50%;
    margin-bottom: 10px;
}
.it-brand-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.it-brand-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    text-align: center;
}
.it-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    font-size: 16px;
    color: #555;
}
.sp-wallet-topup-container {
    padding: 20px 0;
    direction: rtl;
    text-align: right;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
}
.sp-wallet-topup-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: #262626;
    text-align: center;
    margin-bottom: 20px;
}
.sp-wallet-topup-container p {
    font-size: 15px;
    color: #555;
    margin-bottom: 15px;
}
.sp-wallet-topup-container .form-row {
    margin-bottom: 20px;
}
.sp-wallet-topup-container label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}
.sp-wallet-topup-container input[type="number"],
.sp-wallet-topup-container input[type="text"] {
    width: 100%;
    padding: 12px 15px !important;
    background-color: #fafafa;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}
.sp-wallet-topup-container .sp-payment-gateways h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    margin-top: 25px;
}
.sp-wallet-topup-container .sp-payment-gateways ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sp-wallet-topup-container .sp-payment-gateways li {
    padding: 8px 0;
}
.sp-wallet-topup-container button.button {
    width: 100%;
    display: block;
    box-sizing: border-box;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
    background: #28a745;
}
.sp-wallet-topup-container button.button:hover {
    opacity: 0.9;
}
#it-invoice-details-custom {
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
}
#it-invoice-details-custom p {
    display: flex;
    justify-content: space-between;
    margin: 0 0 8px 0;
    font-size: 14px;
}
#it-invoice-details-custom p:last-child {
    font-weight: bold;
}
#it-invoice-details-custom hr {
    margin: 10px 0;
    border: 0;
    border-top: 1px solid #e9ecef;
}

.it-payment-method-custom h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.it-wallet-payment-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f5fa;
    padding: 12px 15px;
    border-radius: 8px;
}

.it-wallet-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}
.it-wallet-info .fa-wallet {
    color: #0095f6;
}
#it-user-wallet-balance {
    font-weight: bold;
    font-size: 15px;
}

#it-payment-actions {
    margin-top: 20px;
}
#it-payment-actions .button, #it-payment-actions .button-primary {
    width: 100%;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}
#it-payment-actions .button-primary {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
#it-payment-actions .button {
    background: #0095f6;
}
.sp-wallet-transactions-container {
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    margin-top: 30px;
    direction: rtl;
    text-align: right;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1d1d1f;
}

.sp-transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.sp-transactions-table th, 
.sp-transactions-table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #eee;
}

.sp-transactions-table thead th {
    background-color: #f7f7f7;
    font-weight: 600;
    font-size: 14px;
}

.sp-transactions-table tbody tr:last-child td {
    border-bottom: none;
}

.sp-transactions-table tbody td {
    font-size: 13px;
}

.sp-transactions-table .type-credit {
    color: #28a745;
    font-weight: bold;
}
.sp-transactions-table .type-credit::before {
    content: '▲ ';
}

.sp-transactions-table .type-debit {
    color: #dc3545;
    font-weight: bold;
}
.sp-transactions-table .type-debit::before {
    content: '▼ ';
}
.sp-wallet-topup-container .sp-payment-gateways ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
}

.sp-wallet-topup-container .sp-payment-gateways li {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sp-wallet-topup-container .sp-payment-gateways li:last-child {
    border-bottom: none;
}

.sp-wallet-topup-container .sp-payment-gateways li:hover {
    background-color: #f7f7f7;
}

.sp-wallet-topup-container .sp-payment-gateways input[type="radio"] {
    -webkit-appearance: radio !important;
    appearance: radio !important;
    width: 1.2em;
    height: 1.2em;
    margin-left: 12px;
    flex-shrink: 0;
}

.sp-wallet-topup-container .sp-payment-gateways label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0;
    flex-grow: 1;
}
.sp-wallet-topup-button,
#it-payment-actions .button,
#sp-pay-with-wallet-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 15px !important;
    font-weight: 600 !important;
    padding: 14px 15px !important;
    height: auto !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer;
    margin-top: 15px;
    transition: opacity 0.2s;
}

.sp-wallet-topup-button:hover,
#it-payment-actions .button:hover,
#sp-pay-with-wallet-btn:hover {
    opacity: 0.9;
}
@media (max-width: 600px) {
    .sp-transactions-table thead {
        display: none;
    }
    .sp-transactions-table, .sp-transactions-table tbody, .sp-transactions-table tr, .sp-transactions-table td {
        display: block;
        width: 100%;
        text-align: right;
    }
    .sp-transactions-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
        box-sizing: border-box;
    }
    .sp-transactions-table td {
    display: flex; /* ✅ استفاده از فلکس‌باکس برای چیدمان */
    justify-content: space-between; /* ✅ ایجاد فاصله بین لیبل و مقدار */
    align-items: center;
    text-align: right !important; /* تراز کلی متن به راست */
    padding-right: 15px !important;
    padding-left: 15px !important;
    position: relative;
    border-bottom: 1px dashed #f0f0f0;
    }
    .sp-transactions-table td:last-child {
        border-bottom: none;
    }
    .sp-transactions-table td::before {
    content: attr(data-label);
    font-weight: bold;
    font-size: 13px;
    color: #555;
    position: static;
    width: auto;
    padding: 0;
    }
}
.sp-wallet-topup-container {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .sp-wallet-topup-container {
        max-width: 95%;
    }
}
.sp-current-balance-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    direction: rtl;
}

.sp-current-balance-line p {
    margin: 0;
    font-size: 15px;
    color: #333;
}

.sp-transactions-icon {
    font-size: 20px;
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
}

.sp-transactions-icon:hover {
    color: #007bff;
}
#sp-transactions-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.sp-popup-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: popup-scale-in 0.3s ease-out;
    direction: rtl;
}

.sp-table-wrapper {
    max-height: 60vh;
    overflow-y: auto;
}

.sp-popup-content h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
}
.sp-popup-close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    font-weight: bold;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}

.sp-popup-close-btn:hover {
    color: #000;
}
.sp-profile-container-insta {
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #262626;
}

.sp-profile-container-insta .profile-header {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 15px;
}

.sp-profile-container-insta .profile-header .username {
    font-size: 20px;
    font-weight: 600;
}

.sp-profile-container-insta .profile-stats-and-pic {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-bottom: 15px;
}

.sp-profile-container-insta .profile-pic {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.sp-profile-container-insta .profile-pic img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dbdbdb;
}

.sp-profile-container-insta .profile-stats {
    display: flex;
    gap: 20px;
    text-align: center;
}

.sp-profile-container-insta .stat-item {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #8e8e8e;
}

.sp-profile-container-insta .stat-item span {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
}

.sp-profile-container-insta .profile-bio {
    text-align: right;
    margin-bottom: 20px;
}

.sp-profile-container-insta .profile-bio .full-name {
    display: block;
    font-weight: 600;
    font-size: 15px;
}
.sp-profile-container-insta .profile-bio .city {
    display: block;
    font-size: 14px;
    color: #8e8e8e;
}

.sp-profile-form-insta {
    margin-top: 20px;
}

.sp-profile-form-insta .form-row-insta {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.sp-profile-form-insta label {
    font-size: 12px;
    color: #8e8e8e;
    margin-bottom: 3px;
}

.sp-profile-form-insta input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #dbdbdb;
    border-radius: 0;
    padding: 8px 0 !important;
    font-size: 15px;
    color: #262626;
    width: 100%;
}
.sp-profile-form-insta input:focus {
    outline: none;
    border-bottom-color: #262626;
}

.sp-profile-form-insta .form-divider {
    border: 0;
    border-top: 1px solid #efefef;
    margin: 20px 0;
}

.sp-profile-form-insta .form-row-insta.readonly span {
    font-size: 15px;
    color: #262626;
    padding: 8px 0;
    border-bottom: 1px solid #efefef;
}

#sp-save-profile-btn {
    width: 100%;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.2s ease;
    background: #0095f6;
}

#sp-save-profile-btn:disabled {
    background: #c7e0f8;
    cursor: not-allowed;
}
.profile-pic-wrapper {
    position: relative;
}

.profile-pic {
    position: relative;
    width: 90px;
    height: 90px;
    cursor: pointer;
}

.profile-pic .pic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}
.profile-pic:hover .pic-overlay {
    opacity: 1;
}

#sp-avatar-status-msg {
    margin-top: -10px;
    margin-bottom: 15px;
}
.sp-validation-notice {
    background-color: #fff0f0;
    color: #c53030;
    border: 1px solid #f5c6cb;
    border-right-width: 5px;
    border-right-color: #e53e3e;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.1);
    animation: fadeIn 0.4s ease;
    text-align: right;
}

.sp-validation-notice i {
    font-size: 18px;
    margin-left: 10px;
}
#it-success-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#it-success-popup {
    background-color: #fff;
    padding: 30px;
    border-radius: 16px;
    max-width: 300px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    animation: popup-scale-in 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    direction: rtl;
}

#it-success-popup h4 {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
    margin: 15px 0 5px 0;
}

#it-success-popup p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}
    
#it-success-popup small {
    font-size: 12px;
    color: #888;
}

.it-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}

.it-success-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4CAF50;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.it-success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #4CAF50;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

.it-success-progress-bar-container {
    width: 100%;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-top: 20px;
    overflow: hidden;
}

.it-success-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 3s linear;
}
#it-multi-step-form.order-success .it-form-steps-container {
    display: none !important;
}

#it-order-success-container {
    padding: 30px;
    text-align: center;
    animation: fadeIn 0.5s ease;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#it-order-success-container h4 {
    font-size: 18px;
    font-weight: 600;
    color: #28a745;
    margin: 15px 0 5px 0;
}

#it-order-success-container p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}
    
#it-order-success-container small {
    font-size: 12px;
    color: #888;
}

#it-order-success-container .it-success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}

#it-order-success-container .it-success-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #4CAF50;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

#it-order-success-container .it-success-checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #4CAF50;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

#it-order-success-container .it-success-progress-bar-container {
    width: 100%;
    max-width: 250px;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 20px auto 0;
    overflow: hidden;
}

#it-order-success-container .it-success-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 3s linear;
}
.it-modern-loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 20px;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.it-modern-loader .it-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #262626;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.it-modern-loader p {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin: 0;
}

.it-modern-loader span {
    font-size: 14px;
    color: #8e8e8e;
    margin-top: 8px;
}
.sp-avatar-actions {
    text-align: center;
    margin-top: 5px;
    margin-bottom: 15px;
}
.button-link-danger {
    background: none;
    border: none;
    color: #ed4956;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
}
.button-link-danger:hover {
    text-decoration: underline;
}
.profile-pic-wrapper {
    position: relative;
}
.sp-avatar-options-btn {
    position: absolute;
    bottom: 0;
    right: -5px;
    background-color: #0095f6;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sp-avatar-dropdown-menu {
    position: absolute;
    top: 105%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    overflow: hidden;
    animation: popup-scale-in 0.2s ease-out;
}

.sp-avatar-dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-avatar-dropdown-menu li {
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 500;
    color: #262626;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.sp-avatar-dropdown-menu li:hover {
    background-color: #fafafa;
}

.sp-avatar-dropdown-menu li.danger {
    color: #ed4956;
}

.sp-avatar-dropdown-menu li i {
    width: 16px;
    text-align: center;
}
#it-multi-step-form.order-error .it-form-steps-container {
    display: none !important;
}

#it-order-error-container {
    padding: 30px;
    text-align: center;
    animation: fadeIn 0.5s ease;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#it-order-error-container h4 {
    font-size: 18px;
    font-weight: 600;
    color: #dc3545;
    margin: 15px 0 5px 0;
}

#it-order-error-container p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
}
    
#it-order-error-container small {
    font-size: 12px;
    color: #888;
}

.it-error-crossmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}

.it-error-crossmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #dc3545;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.it-error-crossmark-line1, .it-error-crossmark-line2 {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #dc3545;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

.it-error-progress-bar-container {
    width: 100%;
    max-width: 250px;
    height: 5px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 20px auto 0;
    overflow: hidden;
}

.it-error-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #dc3545;
    border-radius: 5px;
    transition: width 3.2s linear;
}
.it-invoice-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    margin-top: 15px;
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.it-invoice-body {
    padding: 20px 20px 10px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.it-invoice-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.it-invoice-row .item-label {
    color: #555;
}

.it-invoice-row .item-value {
    font-weight: 600;
    color: #1d1d1f;
    direction: ltr;
    text-align: right;
}

.it-invoice-total {
    background-color: #f7f9fc;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eef2f7;
}

.it-invoice-total .total-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.it-invoice-total .total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #007aff;
}

.it-payment-summary {
    padding: 20px;
    background-color: #fff;
}

.it-wallet-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f5fa;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.it-wallet-balance-row .wallet-icon-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
.it-wallet-balance-row .wallet-icon-label .fa-wallet {
    color: #0095f6;
}

#it-user-wallet-balance {
    font-weight: bold;
    font-size: 15px;
}

.payment-actions-container .it-error-box {
    margin: 0;
    text-align: center;
    padding: 12px;
    font-size: 13px;
}

.payment-actions-container .sp-wallet-topup-button {
    margin-top: 10px;
    width: 100%;
    text-align: center;
    display: block;
}

#sp-pay-with-wallet-btn {
    background: linear-gradient(45deg, #4CAF50, #81C784);
    color: white;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
#sp-pay-with-wallet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}
























/* Instagram Direct-Like Chat Styles - FINAL VERSION with Correct Ordering */
/* ================================================== */
/* ✅ START: Final & Definitive Chat Page Layout Fix */
/* ================================================== */

/* 1. غیرفعال کردن اسکرول کل صفحه در صفحه چت */
body.sp-body-chat-active {
    overflow: hidden;
    height: 100vh;
}

/* 2. تنظیم قاب گوشی برای پر کردن صفحه نمایش کاربر */
body.sp-body-chat-active .iphone-mockup,
body.sp-body-chat-active .samsung-mockup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 10vh 0; /* ایجاد کمی فاصله از بالا و پایین صفحه */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.sp-body-chat-active .iphone-frame,
body.sp-body-chat-active .samsung-frame {
    width: 95vw;
    height: 100%;
    max-width: 420px; /* حداکثر عرض برای نمایشگرهای بزرگ */
    max-height: 900px; /* حداکثر ارتفاع */
}

/* 3. تنظیم محتوای داخلی برای اشغال کامل فضا و فعال‌سازی Flexbox */
body.sp-body-chat-active .iphone-screen,
body.sp-body-chat-active .samsung-screen,
body.sp-body-chat-active .iphone-content {
    height: 100%;
    min-height: auto;
    display: flex; /* فعال‌سازی Flexbox برای مدیریت چیدمان داخلی */
    flex-direction: column; /* چیدمان عمودی */
    padding: 0 !important; /* حذف هرگونه پدینگ اضافی */
}
/* ============================================= */
/* ✅ START: Hide Scrollbar in Chat Window      */
/* ============================================= */

/* کد برای مرورگرهای WebKit (Chrome, Safari, Edge جدید) */
.sp-chat-messages::-webkit-scrollbar {
    display: none; /* نوار اسکرول را به طور کامل مخفی می‌کند */
}

/* کد برای سایر مرورگرها (مانند Firefox) */
.sp-chat-messages {
    -ms-overflow-style: none;  /* برای اینترنت اکسپلورر و Edge قدیمی */
    scrollbar-width: none;  /* برای فایرفاکس */
}

/* ✅ END: Hide Scrollbar in Chat Window */
/* 4. تنظیم کانتینر اصلی چت */
.sp-chat-container {
    height: 100%; /* اشغال 100% ارتفاع والد (iphone-content) */
    display: flex;
    flex-direction: column;
}

/* 5. مهم‌ترین بخش: فعال کردن اسکرول فقط برای ناحیه پیام‌ها */
.sp-chat-messages {
    flex-grow: 1; /* این بخش تمام فضای خالی عمودی را اشغال می‌کند */
    overflow-y: auto; /* فعال کردن اسکرول عمودی فقط برای این بخش */
    min-height: 0; /* جلوگیری از مشکلات Flexbox */
}

/* ✅ END: Final & Definitive Chat Page Layout Fix */
.sp-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 550px;
    background-color: #fff;
    color: #000;
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    padding-top: 44px;
}
/* Timestamp Style */
.sp-message-time {
    font-size: 9px;
    color: #8e8e8e;
    margin-top: 5px;
}
.sp-chat-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 44px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 15px;
    z-index: 10;
    color: #000;
    box-sizing: border-box;
}
.sp-chat-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 125px;
    height: 35px;
    background: #000;
    border-radius: 0 0 20px 20px;
}
.sp-chat-status-bar-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sp-chat-status-bar .fas {
    font-size: 14px;
}

.sp-chat-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 15px;
    border-bottom: 1px solid #efefef;
    background-color: #fff;
}
.sp-chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}
.sp-chat-header-info {
    text-align: right;
}
.sp-chat-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}
.sp-chat-header-info span {
    font-size: 12px;
    color: #8e8e8e;
}

.sp-chat-messages {
    flex-grow: 1;
    padding: 20px 15px;
    overflow-y: auto;
    background-color: #fff;
    display: flex;
    flex-direction: column; /* Normal direction */
}

.sp-chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    max-width: 75%;
}
.sp-message-bubble {
    padding: 12px 18px;
    border-radius: 22px;
    line-height: 1.4;
    word-wrap: break-word;
}
.sp-message-bubble p {
    margin: 0;
}

.sp-chat-message.sent {
    align-self: flex-start;
}
.sp-chat-message.sent .sp-message-bubble {
    background: linear-gradient(to right, #7e42f5, #3797f0);
    color: #ffffff !important;
}

.sp-chat-message.received {
    align-self: flex-end;
}
.sp-chat-message.received .sp-message-bubble {
    background-color: #efefef;
    color: #000 !important;
}

.sp-chat-input-form {
    padding: 10px 15px;
    border-top: 1px solid #efefef;
    background-color: #fff;
}
.sp-chat-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #efefef;
    border-radius: 22px;
    padding: 5px;
}
.sp-chat-input {
    flex-grow: 1;
    background-color: transparent;
    border: none;
    padding: 10px 15px !important;
    color: #000;
    height: auto !important;
    min-height: 24px;
    outline: none;
}
.sp-chat-input::placeholder {
    color: #8e8e8e;
}

.sp-chat-send-btn {
    background: #d500d4;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 18px !important;
    border-radius: 20px;
    margin-left: 5px;
    transition: opacity 0.2s;
    width: auto !important;
    line-height: 1.5;
}
.sp-chat-input:placeholder-shown + .sp-chat-send-btn {
    opacity: 0.5;
    pointer-events: none;
}