/**
 * Frontend Stylesheet for DS Elementor Legal Boxes Widget
 * Styled to match kitarino.net: FuturaPT, brand purple #6804CC, flat/minimal, generous whitespace.
 */

:root {
    --ds-lb-primary: #6804cc;             /* kitarino brand purple, replaces WP admin blue */
    --ds-lb-secondary: #E23770;
    --ds-lb-primary-light: #f6f0fd;       /* very light purple tint for hover backgrounds */
    --ds-lb-primary-border: #ddc9f7;      /* soft purple-tinted border on hover */
    --ds-lb-bg-card: #ffffff;
    --ds-lb-text-main: #1a1a1a;           /* near-black, warmer than previous slate tone */
    --ds-lb-text-muted: #767676;          /* accessible mid-gray */
    --ds-lb-shadow: rgba(0, 0, 0, 0.4) 0px 0px 30px -10px;                 /* kitarino is flat; no card elevation needed */
    --ds-lb-shadow-hover: rgba(0, 0, 0, 0.4) 0px 0px 30px -10px;           /* consistent flat treatment on hover */
    --ds-lb-radius-card: 25px;            /* subtle rounding; 16px competed with page layout */
    --ds-lb-radius-item: 100px;            /* minimal rounding on list items */
}

/* Wrapper Layout */
.ds-legal-boxes-wrapper {
    display: grid;
    grid-gap: 30px;
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0;
}

.ds-legal-boxes-wrapper.ds-layout-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ds-legal-boxes-wrapper.ds-layout-col-1 {
    grid-template-columns: 1fr;
}

/* Base Card Design */
.ds-legal-box-card {
    background: var(--ds-lb-bg-card);
    border-radius: var(--ds-lb-radius-card);
    padding: 32px;                        /* slightly reduced from 35px, matches kitarino section rhythm */
    box-shadow: var(--ds-lb-shadow);
    border: 1px solid #e8e8e8;            /* neutral gray border, no blue tint */
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease;  /* removed transform/shadow transitions — flat design */
}

/* Card Header */
.ds-card-header {
    position: relative;
    margin-bottom: 24px;
    padding-bottom: 14px;
}

.ds-legal-box-title {
    color: var(--ds-lb-text-main) !important;
    font-size: 30px !important;           /* reduced from 22px; less visual weight against page content */
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    font-family: inherit;
}

/* Documents List */
.ds-legal-box-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;                            /* slightly tighter than 12px, cleaner rhythm */
}

/* List Item Link */
.ds-legal-box-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style-type: none !important;
}

.ds-legal-box-link {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: space-between;
    padding: 9px 28px 10px 18px;                    
    background: #fff;
    border: 3px solid var(--ds-lb-secondary);
    border-radius: var(--ds-lb-radius-item);
    text-decoration: none !important;
    color: var(--ds-lb-secondary) !important;
    transition: background 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.ds-legal-box-link:active, .ds-legal-box-link:hover {
    background: var(--ds-lb-secondary) !important;                  /* slightly deeper purple tint on press */
}

/* Link Content Left */
.ds-link-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

/* PDF SVG Icon */
.ds-pdf-icon {
    width: 20px;                          /* slightly smaller, less dominant */
    height: 20px;
    color: var(--ds-lb-secondary);          /* brand purple, removed jarring red */
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ds-legal-box-link:hover .ds-pdf-icon {
    transform: scale(1.08);               /* subtle scale only; no rotation — keeps it calm */
    color: #fff;
}

/* Document Title */
.ds-doc-title {
    font-size: 16px;
    font-weight: 700;                     /* reduced from 600; matches kitarino's measured weight */
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ds-lb-secondary);
    transition: color 0.2s ease;
    -webkit-font-smoothing: antialiased;
}

.ds-legal-box-link:hover .ds-doc-title {
    color: #fff;
}

/* Action Badge Right */
.ds-link-badge {
    color: var(--ds-lb-secondary);
    transition: color 0.2s ease, border-color 0.2s ease;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 12px;
}
.ds-legal-box-link:hover .ds-link-badge {
    color: #fff;
}

/* Action Badge Arrow SVG */
.ds-arrow-icon {
    width: 25px;
    transition: transform 0.2s ease;
}

.ds-legal-box-link:hover .ds-arrow-icon {
    transform: translateX(2px);           /* reduced from 3px — subtler nudge */
}

/* Empty/No Docs Fallback Message */
.ds-no-docs-message {
    font-style: italic;
    color: var(--ds-lb-text-muted);
    margin: 10px 0 0 0;
    font-size: 14px;
}

/* WYSIWYG Editor Content Styling */
.ds-legal-box-content {
    color: var(--ds-lb-text-main);
    font-size: 16px;
    line-height: 1.3;
}

.ds-legal-box-content h2, .ds-legal-box-content h3 {
    font-weight: 700;
}

.ds-legal-box-content h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
}

.ds-legal-box-content h3 {
    font-size: 18px !important;
    line-height: 1.3 !important;
}

.ds-legal-box-content p {
    margin: 0 0 14px 0;
}

.ds-legal-box-content p:last-child {
    margin-bottom: 0;
}

.ds-legal-box-content a {
    color: var(--ds-lb-secondary);
    text-decoration: underline;           /* kitarino uses clean underlines, not dashed */
    text-underline-offset: 2px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.ds-legal-box-content a:hover {
    opacity: 0.8;                       /* slightly deeper purple on hover, no color switch to red */
}

.ds-legal-box-content ul,
.ds-legal-box-content ol {
    margin: 0 0 14px 0;
    padding-left: 0;
}

.ds-legal-box-content ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ds-legal-box-content ul li {
    position: relative;
    padding-left: 20px;
    margin: 0;
}

.ds-legal-box-content ul li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    width: 5px;
    height: 5px;
    background: var(--ds-lb-primary);    /* solid brand purple; removed blue-to-red gradient */
    border-radius: 50%;
    box-shadow: none;                     /* removed glow — too ornamental for flat aesthetic */
}

.ds-legal-box-content ol {
    list-style-position: inside;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ds-legal-box-content ol li {
    margin: 0;
}

.ds-legal-box-content li > ul,
.ds-legal-box-content li > ol {
    margin-top: 10px;
    margin-bottom: 0;
    padding-left: 16px;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .ds-legal-box-card {
        padding: 24px;
    }
    .ds-legal-box-title {
        font-size: 26px !important;
    }

    .ds-legal-box-content h2 {
        font-size: 22px !important;
    }

    .ds-legal-box-content h3 {
        font-size: 18px !important;
    }

    .ds-legal-boxes-wrapper.ds-layout-col-2 {
        grid-template-columns: 1fr;
        grid-gap: 20px;
    }

    .ds-legal-box-link {
        padding: 12px 14px;
    }
}