/* Basic Reset & Body Styling */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* Light grey background */
    color: #212529; /* Dark text color */
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    border-radius: 6px;
}

/* Header */
.app-header {
    background-color: #000000; /* Black header */
    color: #ffffff;
    padding: 15px 30px;
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 10px;
    /* Adjust size if needed */
    width: 24px;
    height: 28px;
}


/* Main Content Area */
.main-container {
    padding: 30px;
    flex-grow: 1; /* Allows main to fill remaining vertical space */
}

.page-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #000000; /* Explicitly black */
}

/* Dashboard Layout (using Flexbox) */
.dashboard-layout {
    display: flex;
    gap: 25px; /* Space between columns */
}

/* Left Sidebar */
.sidebar-left {
    flex: 0 0 180px; /* Don't grow, don't shrink, base width 180px */
}

.sidebar-left ul li {
    margin-bottom: 5px;
}

.sidebar-left ul li a {
    display: block;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #495057; /* Default item color */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-left ul li a:hover {
    background-color: #e9ecef; /* Light hover background */
}

.sidebar-left ul li.active a {
    background-color: #e8e7ff; /* Active background color (light purple) */
    color: #543EE0; /* Active text color (purple) */
    font-weight: 600;
}

/* Center Content Panel */
.content-panel {
    flex-grow: 1; /* Takes up remaining space */
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6; /* Subtle border */
    min-width: 0; /* Prevents overflow issues in flex */
}

.panel-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #000000;
}

/* File Dropzone */
.file-dropzone {
    border: 2px dashed #ced4da; /* Dashed border */
    border-radius: 8px;
    padding: 40px 20px;
    background-color: #f8f9fa; /* Very light background */
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer; /* Indicate it's clickable */
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.file-dropzone:hover {
    border-color: #adb5bd;
    background-color: #e9ecef;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-icon {
    color: #6c757d; /* Icon color */
    margin-bottom: 15px;
}

.dropzone-text {
    font-size: 1rem;
    color: #495057; /* Slightly darker text */
    margin-bottom: 5px;
}

.dropzone-text .click-select {
    color: #543EE0; /* Highlight color for "click to select" */
    font-weight: 500;
    text-decoration: underline; /* Optional: if it looks like a link */
}


.supported-types {
    font-size: 0.85rem;
    color: #6c757d; /* Lighter text color */
}

.info-text {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Right Sidebar */
.sidebar-right {
    flex: 0 0 250px; /* Adjust width as needed */
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    height: fit-content; /* Make sidebar only as tall as its content */
}

.sources-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef; /* Separator line */
}

.size-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 20px;
}

.size-value {
    font-weight: 500;
    color: #212529;
}

.size-value strong {
    font-weight: 700;
}

.create-button {
    background-color: #212529; /* Dark button background */
    color: #ffffff;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    transition: background-color 0.2s ease;
}

.create-button:hover {
    background-color: #343a40; /* Slightly lighter on hover */
}

/* Responsive Adjustments (Basic Example) */
@media (max-width: 992px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar-left, .sidebar-right {
        flex-basis: auto; /* Reset basis */
        width: 100%; /* Take full width on smaller screens */
    }

    .sidebar-right {
       order: 3; /* Move right sidebar below content on small screens */
    }
     .content-panel {
       order: 2;
    }
     .sidebar-left {
       order: 1;
       margin-bottom: 20px; /* Add space when stacked */
    }
}

@media (max-width: 768px) {
     .app-header {
        padding: 15px;
     }
    .main-container {
        padding: 20px;
    }
    .page-title {
        font-size: 1.6rem;
    }
}

/* === Previous styles remain the same, add the following below === */

/* Logo Image Styling */
.logo-image {
    height: 28px; /* Match the height of the previous SVG or adjust as needed */
    width: auto;
    margin-right: 10px;
    vertical-align: middle; /* Align image nicely with text */
}

/* Tab Pane Styling */
.tab-pane {
    display: none; /* Hide tabs by default */
}

.tab-pane.active {
    display: block; /* Show active tab */
}

.hidden { /* Utility class to hide elements */
    display: none !important;
}


/* Website Tab Specific Styles */
.website-section {
    margin-bottom: 25px;
}

.section-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #343a40;
    font-size: 0.95rem;
}

.input-button-group {
    display: flex;
    gap: 10px; /* Space between input and button */
}

.input-button-group input[type="url"] {
    flex-grow: 1; /* Input takes available space */
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.input-button-group input[type="url"]:focus {
    outline: none;
    border-color: #80bdff; /* Highlight on focus */
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-button-group input[type="url"].error {
    border-color: #dc3545; /* Red border for error */
}


.inline-button {
    padding: 10px 15px;
    background-color: #e9ecef; /* Light gray background */
    color: #212529;
    border: 1px solid #ced4da;
    font-weight: 500;
    white-space: nowrap; /* Prevent button text wrapping */
    transition: background-color 0.2s ease;
}

.inline-button:hover {
    background-color: #dee2e6; /* Darker hover */
}

.section-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 8px;
}

.separator {
    text-align: center;
    color: #adb5bd;
    font-weight: 500;
    margin: 30px 0;
    position: relative;
}

/* Line through OR */
.separator::before,
.separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%; /* Adjust width of lines */
    height: 1px;
    background-color: #e9ecef; /* Light line color */
}

.separator::before {
    left: 0;
}

.separator::after {
    right: 0;
}

/* Included Links Section */
.included-links-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef; /* Separator line */
}

.included-links-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #343a40;
}

#includedLinksContainer {
    /* Styles for the container where links might appear */
    min-height: 50px; /* Ensure some space even when empty */
    margin-bottom: 15px;
}

.no-links-text {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9em;
}

.add-link-button {
    background-color: #f8f9fa;
    border: 1px dashed #ced4da;
    color: #6c757d;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50%; /* Make it circular */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
}

.add-link-button:hover {
    background-color: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

/* Text Tab Specific Styles */
.text-input-area {
    width: 100%;
    min-height: 200px; /* Adjust as needed */
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical; /* Allow vertical resizing */
}
.text-input-area:focus {
     outline: none;
    border-color: #80bdff; /* Highlight on focus */
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Right Sidebar Sources Placeholder */
.sources-list {
    min-height: 60px; /* Placeholder height */
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

/* === Add this rule to your existing CSS === */

.error-message {
    color: #dc3545; /* Red color for errors */
    font-size: 0.85em; /* Slightly smaller font */
    margin-top: 5px; /* Space above the message */
    font-weight: 500;
}

/* Ensure hidden class works (it should already be defined) */
.hidden {
    display: none !important;
}

/* Optional: Slightly more space below input group when error shows */
.input-button-group + .error-message:not(.hidden) {
     margin-bottom: -10px; /* Adjust spacing if needed */
}

/* Existing error style for the input border */
.input-button-group input[type="url"].error {
    border-color: #dc3545; /* Red border for error */
}
.input-button-group input[type="url"].error:focus {
     /* Optional: Keep red border on focus if error exists */
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
