/* =========================================
   LinkedIn Post Preview — Freetool CSS
   ========================================= */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: 'Outfit', 'Karla', Arial, sans-serif;
    color: #333;
    background-color: transparent;
    display: flex;
    justify-content: center;
    height: 100vh;
}

/* =========================================
   Page Layout — Side by Side
   ========================================= */
.page-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 20px;
}

/* =========================================
   Editor Panel (LEFT)
   ========================================= */
.editor-panel {
    width: 100%;
    max-width: 600px;
    margin-bottom: 24px;
}

.editor-card {
    background-color: #f1f5fc;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.editor-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.editor-header h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.editor-header p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Textarea */
.textarea-wrapper {
    position: relative;
}

#post-input {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    font-family: 'Outfit', 'Karla', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    border: 2px solid #DBE4FE;
    border-radius: 8px;
    background: #fff;
    color: #333;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

#post-input:focus {
    border-color: #608CFA;
}

#post-input::placeholder {
    color: #94a3b8;
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.5rem;
    padding-right: 4px;
}

.char-count.over-limit {
    color: #ef4444;
}

/* =========================================
   Preview Panel (RIGHT)
   ========================================= */
.preview-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

/* =========================================
   Responsive Toolbar
   ========================================= */
.responsive-toolbar {
    display: flex;
    gap: 8px;
    background: #f1f5fc;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-family: 'Outfit', 'Karla', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: rgba(96, 140, 250, 0.08);
    color: #608CFA;
}

.toolbar-btn.active {
    background: #fff;
    color: #608CFA;
    border-color: #DBE4FE;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* =========================================
   LinkedIn Card (New EXACT Style)
   ========================================= */
.hook-label, .full-label {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -10px;
    padding-left: 4px;
    width: 100%;
}

.card-label-icon {
    font-size: 14px;
}

.card-label-text {
    font-size: 0.7rem;
    font-weight: 800;
    color: #608CFA;
    letter-spacing: 0.08em;
}

.linkedin-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: white;
    box-shadow: 0 0px 0px 1px rgba(140,140,140,0.2);
    border-radius: 0.4rem;
    transition: width 0.2s linear;
    width: 552px; /* Fixed width + transition */
    max-width: 552px;
}

.lc-internal-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* =========================================
   Header (Avatar + Info)
   ========================================= */
.lc-header {
    display: flex;
    flex-direction: row;
    padding: 16px 12px 8px 12px; /* pt-[16px] pl-[12px] pr-[12px] mb-[8px] */
    margin-bottom: 8px; /* Tailwind mb-[8px] */
}

.lc-header-left {
    display: flex;
    position: relative;
}

/* Avatar */
.lc-avatar-container {
     position: relative;
     display: flex;
     justify-content: center;
     align-items: center;
     box-sizing: border-box;
     overflow: hidden;
     z-index: 10;
     /* text-tiny bg-default text-default-foreground rounded-full w-[48px] h-[48px] min-w-[48px] min-h-[48px] */
     width: 48px;
     height: 48px;
     min-width: 48px;
     min-height: 48px;
     border-radius: 9999px;
     background-color: #e0e0e0; /* fallback */
}

.lc-avatar-img {
    display: flex;
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: opacity 0.5s;
}

/* Info */
.lc-author-info {
    margin-left: 0.5rem; /* ml-2 */
    display: flex;
    flex-direction: column;
}

.lc-author-name {
    font-weight: 600; /* font-semibold */
    font-size: 14px; /* text-[14px] */
    color: #000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.lc-author-headline {
    color: rgba(0, 0, 0, 0.6); /* text-black/60 */
    font-size: 12px; /* text-[12px] */
    line-height: 14px; /* leading-[14px] */
    /* line-clamp-1 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: calc(4rem + 32px); /* pr-[calc(4rem+32px)] */
    max-width: 400px; /* roughly inferred from standard width */
}

.lc-post-date {
    color: rgba(0, 0, 0, 0.6);
    font-size: 12px;
    line-height: 14px;
    /* line-clamp-1 */
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: calc(4rem + 32px);
}

/* Header Right (3 dots) */
.lc-header-right {
    position: absolute;
    right: 12px; /* right-[12px] */
    top: 4px; /* top-[4px] */
}

.lc-options-btn {
    cursor: pointer;
    width: 32px;
    height: 32px;
    color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    transition: all;
}

.lc-options-btn:hover {
    background-color: #f5f5f4; /* hover:bg-stone-100 */
}

/* =========================================
   Body (Text)
   ========================================= */
.lc-body {
    display: flex;
    margin-right: 8px; /* mr-[8px] */
    width: 100%;
}

.lc-text-relative {
    position: relative;
    width: 100%;
    padding: 0 16px; /* px-[16px] */
}

.lc-post-text {
    font-size: 14px; /* text-[14px] */
    white-space: pre-line; /* whitespace-pre-line */
    overflow: hidden; /* overflow-hidden */
    line-height: 20px; /* leading-[20px] */
    word-break: break-word; /* break-words */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #000;
}

/* Hook specific: collapsed text */
.lc-post-text.collapsed {
    max-height: 40px; /* max-h-[40px] */
}

/* See More Button (Hook) */
.lc-see-more {
    position: absolute; /* absolute */
    bottom: 0; /* bottom-0 */
    right: 0; /* right-0 */
    background-color: white; /* bg-white */
}

.lc-see-more-btn {
    color: rgba(0, 0, 0, 0.6); /* text-black/60 */
    transition: all 0.1s;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    padding-left: 2px;
    padding-right: 16px;
}

.lc-see-more-btn:hover {
    color: #93c5fd; /* hover:text-blue-300 - matching user's request */
}

/* =========================================
   Footer (Reactions)
   ========================================= */
.lc-footer {
    display: flex;
    flex-direction: row;
    padding: 8px 16px; /* px-[16px] py-[8px] */
    justify-content: space-between; /* justify-between */
}

.lc-footer-left {
     display: flex;
     flex-direction: row;
     align-items: center;
}

.lc-reactions-stack {
    display: flex;
    flex-direction: row;
}

.lc-reaction {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lc-reaction.z-3 { z-index: 3; }
.lc-reaction.z-2 { z-index: 2; margin-left: -6px; border-radius: 9999px; background: white; }
.lc-reaction.z-1 { z-index: 1; margin-left: -6px; border-radius: 9999px; background: white; }

.lc-count {
    font-size: 12px; /* text-[12px] */
    line-height: 14px; /* leading-[14px] */
    font-weight: 400; /* font-normal */
    padding-left: 4px; /* pl-[4px] */
    color: rgba(0, 0, 0, 0.6); /* text-black/60 */
    cursor: pointer;
    margin-top: 1px;
}

.lc-count:hover {
    text-decoration: underline;
    color: #2563eb; /* text-blue-600 */
}

.lc-footer-right {
    display: flex;
    flex-direction: row;
}

.lc-meta-link, .lc-meta-dot {
    font-size: 12px; /* text-[12px] */
    line-height: 14px; /* leading-[14px] */
    font-weight: 400; /* font-normal */
    padding-left: 4px; /* pl-[4px] */
    color: rgba(0, 0, 0, 0.6); /* text-black/60 */
    cursor: pointer;
}

.lc-meta-link:hover {
    text-decoration: underline;
    color: #2563eb; /* text-blue-600 */
}

/* =========================================
   Responsive — Page Layout
   ========================================= */
@media (max-width: 1200px) {
    .page-layout {
        flex-direction: column;
        align-items: center;
    }

    .editor-panel {
        position: static;
        width: 100%;
        max-width: 580px;
    }

    .preview-panel {
        width: 100%;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .page-layout {
        padding: 16px;
        gap: 16px;
    }
    
    .linkedin-card {
        width: 100% !important;
        max-width: 100%;
    }
}
