/* Jeff's Architecture - Skin Pages
   File: skins/default/css/pages.css
*/

/* --- 1. AUTHENTICATION (Login, Signup, Forgot) --- */
.page-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem 1rem;
}

.login-form-wrapper, .register-form-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-float);
    text-align: left;
}

.register-form-wrapper {
    max-width: 600px;
}

.auth-nav {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-message-register {
    background-color: var(--bg-surface-2);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
    text-align: center;
}

/* --- 2. DOCUMENTATION / DEVELOPER HUB --- */
.docs-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.docs-sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

.docs-content {
    flex-grow: 1;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.docs-nav-group { margin-bottom: 2rem; }

.docs-nav-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.docs-nav-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-main);
    font-size: 0.95rem;
    border-left: 2px solid transparent;
    padding-left: 1rem;
}

.docs-nav-link:hover, .docs-nav-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    background-color: var(--bg-surface-2);
}

.docs-code-block {
    background-color: #0d1117; 
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: monospace;
    color: #e6edf3;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid #30363d;
}

.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.styled-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

.styled-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

/* --- 3. MESSENGER & SUPPORT TICKETS (Bubble Chat) --- */

.messenger-layout {
    display: flex;
    height: calc(100vh - 140px);
    min-height: 500px;
    gap: 20px;
    margin-top: 20px;
    resize: vertical;
    overflow: hidden; 
    padding-bottom: 10px; 
}

.chat-sidebar {
    width: 300px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.user-list-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-main);
}

.user-list-item:hover {
    background: var(--bg-surface-2);
}

.user-list-item.active {
    background: var(--bg-surface-2);
    border-left: 3px solid var(--primary);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    min-height: 0; 
}

.chat-messages {
    flex: 1; 
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-surface);
}

/* Bubbles */
.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem; /* Standard Size */
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

/* FIX: Highlight Latest Message (SCALED UP 18%) */
.msg-latest {
    border: 2px solid #FFD700 !important; /* Gold Border */
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.25); /* Adjusted glow */
    z-index: 5;
    margin-top: 25px; /* Space for the label popping out top */
    
    /* 18% Larger Stats */
    font-size: 1.12rem; /* Was 1.25rem (30% increase) */
    padding: 14px 18px; /* Adjusted padding */
    line-height: 1.55;
}

/* Scale the timestamp inside the latest message */
.msg-latest .msg-meta {
    font-size: 0.8rem; /* Scaled down slightly */
    margin-bottom: 6px;
}

/* The Label (Adjusted Size and Position) */
.msg-latest::after {
    content: "Most recent message";
    position: absolute;
    top: -16px; /* Adjusted for smaller size */
    right: 15px;
    background-color: #FFD700;
    color: #000;
    font-family: "Courier New", monospace;
    font-size: 0.8rem; /* Adjusted for better fit */
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.msg-me {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.msg-other {
    align-self: flex-start;
    background: var(--bg-surface-2); 
    color: var(--text-main);         
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 2px;
}

.msg-meta {
    font-size: 0.7rem;
    margin-bottom: 4px;
    display: block;
    opacity: 0.7;
    font-weight: 600;
}

/* Compose Area */
.chat-compose {
    padding: 15px; 
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0; 
}

.chat-compose textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    padding: 10px;
    border-radius: var(--radius-md);
    height: 50px; 
    resize: none; 
    margin-bottom: 0;
    font-family: inherit;
}

.chat-compose textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-light);
}

@media (max-width: 768px) {
    .messenger-layout {
        flex-direction: column;
        height: auto;
        min-height: auto; 
    }
    .chat-sidebar {
        width: 100%;
        height: 200px;
        margin-bottom: 15px;
    }
    .chat-main {
        height: 600px; 
    }
}