/* =============================================
   JR Product Long Description Widget
   ============================================= */

/* === Wrapper === */
.jr-long-desc-wrapper {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* === Separator === */
.jr-long-desc-separator {
    display: block;
    width: 100%;
    height: 1px;
    background-color: #e5e5e5;
}

.jr-long-desc-separator.sep-top {
    margin-bottom: 15px;
}

.jr-long-desc-separator.sep-bottom {
    margin-top: 15px;
}

/* === Heading === */
.jr-long-desc-heading-wrap {
    margin-bottom: 15px;
}

.jr-long-desc-heading-wrap.has-underline {
    border-bottom-style: solid;
    border-bottom-width: 2px;
    border-bottom-color: #FF8C00;
    padding-bottom: 10px;
}

.jr-long-desc-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.jr-long-desc-heading-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.jr-long-desc-heading-icon svg {
    width: 20px;
    height: 20px;
}

/* === Content Body === */
.jr-long-desc-body {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.jr-long-desc-body.is-collapsed {
    /* max-height set by JS */
}

/* === Content === */
.jr-long-desc-content {
    font-size: 15px;
    line-height: 1.7;
    color: #444444;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.jr-long-desc-content p {
    margin-bottom: 12px;
}

.jr-long-desc-content p:last-child {
    margin-bottom: 0;
}

.jr-long-desc-content h1,
.jr-long-desc-content h2,
.jr-long-desc-content h3,
.jr-long-desc-content h4,
.jr-long-desc-content h5,
.jr-long-desc-content h6 {
    color: #1a1a1a;
    margin-top: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.jr-long-desc-content h1:first-child,
.jr-long-desc-content h2:first-child,
.jr-long-desc-content h3:first-child,
.jr-long-desc-content h4:first-child,
.jr-long-desc-content h5:first-child,
.jr-long-desc-content h6:first-child {
    margin-top: 0;
}

.jr-long-desc-content a {
    color: #FF8C00;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.jr-long-desc-content a:hover {
    color: #e07b00;
}

.jr-long-desc-content ul,
.jr-long-desc-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.jr-long-desc-content ul li,
.jr-long-desc-content ol li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.jr-long-desc-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.jr-long-desc-content blockquote {
    margin: 15px 0;
    padding: 15px 20px;
    border-left: 4px solid #FF8C00;
    background: #fff8f0;
    font-style: italic;
    color: #555;
}

.jr-long-desc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.jr-long-desc-content table th,
.jr-long-desc-content table td {
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    text-align: left;
}

.jr-long-desc-content table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

.jr-long-desc-content table tr:nth-child(even) td {
    background-color: #fafafa;
}

/* === Gradient Overlay === */
.jr-long-desc-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.jr-long-desc-body:not(.is-collapsed) .jr-long-desc-gradient {
    opacity: 0;
}

.jr-long-desc-body.is-collapsed .jr-long-desc-gradient {
    opacity: 1;
}

/* === Toggle Button === */
.jr-long-desc-toggle-wrap {
    display: flex;
    justify-content: flex-start;
    margin-top: 12px;
}

.jr-long-desc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #FF8C00;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 0;
    line-height: 1;
    transition: all 0.3s ease;
    outline: none;
    font-family: inherit;
}

.jr-long-desc-toggle:hover {
    color: #e07b00;
}

.jr-long-desc-toggle:focus {
    outline: none;
    box-shadow: none;
}

.jr-long-desc-toggle .jr-toggle-icon {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.jr-long-desc-toggle .jr-toggle-icon i,
.jr-long-desc-toggle .jr-toggle-icon svg {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* === Collapsed State === */
.jr-long-desc-body.is-collapsed .jr-long-desc-content {
    /* Content is truncated via JS */
}

/* === Expanded State === */
.jr-long-desc-body.is-expanded {
    max-height: none !important;
}

/* === Responsive === */
@media (max-width: 767px) {
    .jr-long-desc-heading {
        font-size: 17px;
    }

    .jr-long-desc-content {
        font-size: 14px;
    }

    .jr-long-desc-toggle {
        font-size: 13px;
    }
}