/* activity-styles.css */

/* Root variables for colors and fonts */
:root {
    --primary-orange: #FFA500;
    --dark-orange: #FF8C00;
    --light-grey-bg: #f4f4f4;
    --dark-text: #333;
    --light-text: #555;
    --input-bg: #f9f9f9;
    --input-border: #ddd;
    --border-radius: 8px;

    --font-heading: 'Host Grotesk', sans-serif;
    --font-body: 'Josefin Sans', sans-serif;
    --font-code: 'Inconsolata', 'Press Start 2P', 'VT323', monospace;
}

/* General body styling */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--dark-text);
    background-color: var(--light-grey-bg);
    overflow: hidden; 
}

/* Main container for the two panels (flexbox setup) */
.main-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;    
    background-color: #fff;
}

/* Left Panel (child1) - Login/Signup Form Area */
.child1 {
    flex: 0 0 40%; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;     
    padding: 40px 20px;
    box-sizing: border-box;
    position: relative; 
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05); 
    border-radius: 10px;
    min-height: 100vh; 
    overflow-y: auto; 
}

/* Right Panel (child2) - Image Area */
.child2 {
    flex: 0 0 60%; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #F8D88E;
    border-radius: 10px;
    min-height: 100vh;
}

.child2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center; 
    border-radius: 10px;
}

.header-greeting {
    font-family: var(--font-body); 
    font-size: 1em;
    color: var(--text-color); 
    margin-right: 20px; 
    white-space: nowrap; 
}

/* Adjust header-right to accommodate the greeting */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px; 
}

@media (max-width: 768px) {
    .header-greeting {
        display: none; 
    }
}

/* Logo Section within child1 */
.logo-section {
    position: absolute; 
    top: 30px; 
    left: 30px; 
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-text {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--dark-text);
    font-family: var(--font-heading);
}

/* Authentication Tabs (LOGIN / SIGN UP) */
.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    margin-top: 50px;
    width: 100%;
    max-width: 350px; 
}

.tab {
    flex: 1; 
    padding: 12px 0;
    cursor: pointer;
    font-weight: bold;
    color: #ccc;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    border-radius: 5px 5px 0 0;
}

.tab.active {
    color: var(--dark-text);
    border-bottom: 2px solid var(--primary-orange);
}

/* Header for Login Section */
.header {
    font-family: var(--font-heading);
    font-size: 2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-text);
}

/* Login Form Styling */
.login-form {
    width: 100%;
    max-width: 350px;
    margin-bottom: 20px;
}

/* Styling for all common input types in the form */
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px; 
    margin-bottom: 20px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-size: 1em;
    background-color: var(--input-bg);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.2);
}

/* Placeholder text color */
.login-form input::placeholder {
    color: var(--light-text);
}

/* Shared styling for select elements (e.g., gender, birthday) */
.form-group select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    background-color: var(--input-bg);
    font-size: 1em;
}

/* Login/Next/Sign Up Button */
.login-button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-orange);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 165, 0, 0.2);
}

.login-button:hover {
    background-color: var(--dark-orange);
    box-shadow: 0 6px 15px rgba(255, 165, 0, 0.3);
}

/* Alert/Message styling (Bootstrap handles basic styles, these are adjustments) */
.alert {
    margin-top: 15px;
    margin-bottom: 20px;
    padding: 12px;
    font-size: 0.9em;
    border-radius: var(--border-radius);
    text-align: center;
}

/* Layout for birthday selects */
.birthday-selects {
    display: flex;
    gap: 10px;
}

.birthday-selects select {
    flex: 1; /* Distribute space evenly */
}

/* Icon styling adjustments for input wrappers (using SVG data URLs) */
.input-wrapper.email::before,
.input-wrapper.password::before,
.input-wrapper.username::before,
.input-wrapper.gender::before {
    /* Common icon styles */
    content: '';
    position: absolute;
    left: 15px; 
    top: 50%;
    transform: translateY(-50%);
    width: 20px; 
    height: 20px; 
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6; 
}

/* Ensure form sections are hidden/shown correctly */
.form-section {
    display: none;
}
.form-section.active {
    display: block;
}

/* Additional font overrides for inputs/buttons */
input[type="text"], input[type="password"], input[type="email"], select, button {
    font-family: inherit; /* Ensure inputs/buttons use inherited body font */
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .child1, .child2 {
        flex: none;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: auto; 
        overflow-y: visible; 
    }

    .child1 {
        order: 2;
        padding-top: 60px;
    }

    .child2 {
        order: 1;
        height: 250px; 
    }

    .logo-section {
        position: static; 
        margin-bottom: 30px;
        justify-content: center;
    }

    .auth-tabs, .login-form {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .header {
        font-size: 1.8em;
    }
}

        body {
            background-color: #f0f2f5; 
            overflow-x: hidden; 
        }

        .home-container {
            display: grid;
            grid-template-columns: 1fr 300px; 
            grid-template-rows: auto 1fr; 
            min-height: 100vh;
            gap: 20px; 
            padding: 20px;
            box-sizing: border-box;
        }

        /* Header */
        .header-top {
            grid-column: 1 / -1; 
            display: flex;
            align-items: center;
            justify-content: space-between;
            background-color: #fff;
            padding: 15px 30px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 25px; 
        }

        .header-logo-section {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header-logo-icon {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.2em;
            color: white;
            font-weight: bold;
        }
        .header-logo-icon img {
             width: 100%;
             height: 100%;
             object-fit: contain;
             border-radius: 50%;
        }


        .header-logo-text {
            font-family: var(--font-heading);
            font-size: 1.5em;
            font-weight: bold;
            color: var(--dark-text);
        }

        .nav-icons {
            display: flex;
            gap: 20px;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            color: #000;
            font-size: 0.85em;
            font-weight: 500;
            transition: color 0.2s ease;
        }

        .nav-item:hover {
            color: var(--primary-orange);
        }

        .nav-icon {
            width: 24px;
            height: 24px;
            margin-bottom: 5px;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }
        .icon-home { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>'); }
        .icon-search { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>'); }
        .icon-messages { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>'); }

        .header-right {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .header-icon-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: background-color 0.2s ease;
	    display: flex;       
    	    flex-direction: column; 
    	    align-items: center;   
    	    gap: 5px;               
    	    color: #000;            
    	    font-size: 0.8em;       
    	    font-weight: 500;    
        }

        .header-icon-btn:hover {
	    color: var(--primary-orange);
        }

        .header-icon-btn svg {
            width: 24px;
            height: 24px;
            color: #000;
        }

        /* Main Content Area */
        .main-content-area {
            grid-column: 1 / 2; 
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .map-section {
            background-color: #f8f8f8;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            overflow: hidden;
            flex-grow: 1; 
            min-height: 400px; 
            display: flex;
            flex-direction: column;
        }
        .map-frame {
            border: none;
            width: 100%;
            flex-grow: 1; 
            min-height: 350px; 
        }
        .map-controls {
            padding: 10px 15px;
            display: flex;
            gap: 10px;
            background-color: #eee;
            border-bottom: 1px solid #ddd;
        }
        .map-control-btn {
            background-color: #fff;
            border: 1px solid #ccc;
            padding: 5px 10px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9em;
            transition: background-color 0.2s ease;
        }
        .map-control-btn.active {
            background-color: var(--primary-orange);
            color: white;
            border-color: var(--primary-orange);
        }
        .map-control-btn:hover:not(.active) {
            background-color: #f0f0f0;
        }


        .search-bar-section {
            background-color: #fff;
            padding: 15px 20px;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .search-input {
            flex-grow: 1;
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 1em;
            outline: none;
            transition: border-color 0.2s ease;
        }
        .search-input:focus {
            border-color: var(--primary-orange);
        }
        .search-button {
            background-color: var(--primary-orange);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: background-color 0.2s ease;
        }
        .search-button:hover {
            background-color: var(--dark-orange);
        }

        /* Sidebar Sections (Favorites, Messages) */
        .sidebar {
            grid-column: 2 / -1; 
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .sidebar-section {
	    background-color: #fff;
            color: #333; /* Light text */
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }

        .sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #333; 
        }

        .sidebar-title {
            font-family: var(--font-heading);
            font-size: 1.3em;
            font-weight: 600;
        }

        .sidebar-link {
            color: var(--primary-orange);
            text-decoration: none;
            font-size: 0.9em;
            font-weight: 500;
            transition: color 0.2s ease;
        }
        .sidebar-link:hover {
            color: var(--dark-orange);
        }

        .list-item {
            display: flex;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px solid #444; 
        }
        .list-item:last-child {
            border-bottom: none; 
        }

        .list-item-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 15px;
            border: 2px solid var(--primary-orange); 
        }
        .list-item-content {
            flex-grow: 1;
        }
        .list-item-name {
            font-weight: 600;
            color: #333;
        }
        .list-item-meta {
            font-size: 0.8em;
            color: #bbb;
        }
        .list-item-action-btn {
            background-color: #555;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.85em;
            transition: background-color 0.2s ease;
        }
        .list-item-action-btn:hover {
            background-color: #777;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .home-container {
                grid-template-columns: 1fr; 
                grid-template-rows: auto auto auto 1fr; 
            }
            .header-left {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
            .nav-icons {
                width: 100%;
                justify-content: space-around;
                flex-wrap: wrap;
            }
            .nav-item {
                flex-basis: 30%; 
                margin-bottom: 10px;
            }
            .main-content-area, .sidebar {
                grid-column: 1 / -1; 
            }
            .map-section {
                min-height: 300px; 
            }
        }
	/* Style for the map container div */
.map-frame-api {
    border: none;
    width: 100%;
    flex-grow: 1; 
    min-height: 350px; 
    background-color: #e0e0e0; 
    border-radius: 12px; 
}

/* Info Window Styling (Optional but Recommended) */
.info-window-content {
    font-family: var(--font-body); 
    color: #333; 
    padding: 10px;
}

.info-window-content h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.1em;
    color: var(--primary-orange);
}

.info-window-content p {
    margin-bottom: 3px;
    font-size: 0.9em;
    line-height: 1.3;
}

/* --- MESSAGES PAGE SPECIFIC LAYOUT --- */
.messages-main-content-area {
    display: flex;
    flex-grow: 1; 
    padding: 20px;
    gap: 20px; 
    overflow: hidden; 
    background-color: var(--light-bg-color); 
}

.message-list-column {
    flex: 0 0 350px; 
    max-width: 350px;
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    border: 1px solid var(--border-color);
}

.message-detail-column {
    flex-grow: 1; 
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    border: 1px solid var(--border-color);
}

.column-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f4f8; 
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.column-title {
    font-family: var(--font-heading);
    font-size: 1.2em;
    color: var(--text-color);
    margin: 0;
}

.new-message-btn {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
}

.new-message-btn:hover {
    background-color: var(--primary-orange-dark);
}

.new-message-btn svg {
    stroke: white;
    width: 18px;
    height: 18px;
}

/* Message List Container */
.message-list-container {
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 10px;
    background-color: var(--card-inner-bg-color);
}

/* Individual Message List Item */
.message-list-item {
    display: flex;
    align-items: flex-start; 
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    background-color: #8F8F8F;
    transition: background-color 0.2s ease;
    border-radius: 8px; 
    margin-bottom: 5px; 
}

.message-list-item:last-child {
    border-bottom: none; 
    margin-bottom: 0;
}

.message-list-item:hover {
    background-color: #e9ecef; 
}

.message-list-item.active {
    background-color: #d1ecf1; 
    border-left: 5px solid var(--primary-orange); 
    padding-left: 10px; 
}

.message-list-item.unread {
    background-color: #fff3cd; 
    font-weight: bold;
}

.message-list-item.active.unread {
    font-weight: normal; 
}

.message-list-item .list-item-avatar {
    width: 45px; 
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    border: 2px solid var(--primary-orange); 
}

.message-list-item .list-item-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.message-list-item .list-item-name {
    font-size: 1.05em;
    color: var(--text-color);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-list-item .list-item-subject {
    font-weight: 500;
    font-size: 0.95em;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.message-list-item .list-item-preview {
    font-size: 0.85em;
    color: var(--secondary-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-list-item .list-item-meta {
    font-size: 0.8em;
    color: var(--secondary-text-color);
    margin-left: 10px;
    white-space: nowrap;
}

/* Message Detail Header (Right Column Top) */
.message-detail-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #fff;
}

.message-detail-avatar img {
    width: 60px; 
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-orange);
}

.message-detail-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.other-person-name {
    font-family: var(--font-heading);
    font-size: 1.4em;
    color: var(--text-color);
    margin: 0;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    font-size: 0.9em;
}

.action-link {
    color: var(--primary-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

.action-link:hover {
    color: var(--primary-orange-dark);
    text-decoration: underline;
}

.action-separator {
    color: var(--secondary-text-color);
}

/* Message Detail Content */
.message-detail-content {
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 20px;
    line-height: 1.6;
    color: var(--text-color);
}

.message-detail-content h4 {
    color: var(--primary-orange);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.message-detail-content p {
    margin-bottom: 10px;
}

.message-detail-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 15px 0;
}

.empty-detail-message {
    text-align: center;
    color: var(--secondary-text-color);
    padding: 40px;
    font-style: italic;
    font-size: 1.1em;
}

.message-action-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end; 
    gap: 10px;
    background-color: #f0f4f8; 
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.action-btn {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.action-btn:hover {
    background-color: var(--primary-orange-dark);
}

.action-btn.delete-btn {
    background-color: #dc3545;
}

.action-btn.delete-btn:hover {
    background-color: #c82333; 
}

@media (max-width: 992px) {
    .messages-main-content-area {
        flex-direction: column; 
        padding: 10px;
        gap: 10px;
    }

    .message-list-column {
        flex: none; 
        max-width: 100%; 
        height: 300px; 
    }

    .message-detail-column {
        flex-grow: 1; 
        min-height: 400px; 
    }
}

@media (max-width: 768px) {
    .header-logo-text, .header-right span {
        display: none; 
    }
    .header-top {
        padding: 10px;
    }
    .nav-icons .nav-item span {
        font-size: 0.75em; 
    }
    .new-message-btn span {
        display: none; 
    }
    .new-message-btn {
        padding: 8px; 
    }
    .action-link, .action-separator {
        font-size: 0.8em;
    }
    .action-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }
}
.messages-main-content-area {
    display: flex;
    flex-grow: 1; 
    padding: 20px;
    gap: 20px; 
    overflow: hidden; 
    background-color: var(--light-bg-color); 
}

.message-list-column {
    flex: 0 0 350px; 
    max-width: 350px;
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    border: 1px solid var(--border-color);
}

.message-detail-column {
    flex-grow: 1; 
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column; 
    overflow: hidden; 
    border: 1px solid var(--border-color);
}

.column-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    z-index: 1; 
}

.column-title {
    font-family: var(--font-heading);
    font-size: 1.2em;
    color: var(--text-color);
    margin: 0;
}

.new-message-btn {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease;
}

.new-message-btn:hover {
    background-color: var(--primary-orange-dark);
}

.new-message-btn svg {
    stroke: white;
    width: 18px;
    height: 18px;
}

/* Conversation List Container */
.message-list-container {
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 10px;
    background-color: var(--card-inner-bg-color);
}

.message-list-item {
    display: flex;
    align-items: flex-start; 
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.2s ease;
    border-radius: 8px; 
    margin-bottom: 5px;
}

.message-list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.message-list-item:hover {
    background-color: #e9ecef; 
}

.message-list-item.active {
    background-color: #d1ecf1; 
    border-left: 5px solid var(--primary-orange); 
    padding-left: 10px; 
}

.message-list-item.unread {
    background-color: #fff3cd; 
    font-weight: bold;
}

.message-list-item.active.unread {
    font-weight: normal; 
}

.message-list-item .list-item-avatar {
    width: 45px; 
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    border: 2px solid var(--primary-orange); 
}

.message-list-item .list-item-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.message-list-item .list-item-name {
    font-size: 1.05em;
    color: var(--text-color);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.message-list-item .list-item-preview {
    font-size: 0.85em;
    color: var(--secondary-text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-list-item .list-item-meta {
    font-size: 0.8em;
    color: var(--secondary-text-color);
    margin-left: 10px;
    white-space: nowrap;
}

/* Message Detail Header (Right Column Top) */
.message-detail-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #fff;
    z-index: 1; 
}

.message-detail-avatar img {
    width: 50px; 
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-orange); 
}

.message-detail-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.other-person-name {
    font-family: var(--font-heading);
    font-size: 1.3em; 
    color: var(--text-color);
    margin: 0;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    font-size: 0.85em; 
}

.action-link {
    color: var(--primary-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

.action-link:hover {
    color: var(--primary-orange-dark);
    text-decoration: underline;
}

.action-separator {
    color: var(--secondary-text-color);
}

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

.message-bubble {
    max-width: 75%; 
    padding: 10px 15px;
    border-radius: 20px; 
    line-height: 1.4;
    position: relative; 
    word-wrap: break-word; 
}

.message-bubble.sent {
    background-color: #F2A93B;
    color: var(--sent-bubble-text);
    align-self: flex-end; 
    border-bottom-right-radius: 5px; 
}

.message-bubble.received {
    background-color: #D3D3D3;
    color: var(--received-bubble-text);
    align-self: flex-start; 
    border-bottom-left-radius: 5px; 
}

.message-text {
    margin: 0;
    padding-bottom: 5px; 
}

.message-timestamp {
    font-size: 0.7em;
    color: var(--secondary-text-color);
    opacity: 0.8;
    display: block; 
    text-align: right; 
    margin-top: -5px; 
}

.message-bubble.received .message-timestamp {
    text-align: left; 
}

.empty-chat-message {
    text-align: center;
    color: var(--secondary-text-color);
    padding: 40px;
    font-style: italic;
    font-size: 1.1em;
}

/* Message Input Area */
.message-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background-color: #fff;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    align-items: center;
    z-index: 1; 
}

.message-input-area input[type="text"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px; 
    font-size: 1em;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.message-input-area input[type="text"]:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.send-message-btn {
    background-color: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 50%; 
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0; 
    box-shadow: var(--shadow-sm);
}

.send-message-btn:hover {
    background-color: var(--primary-orange-dark);
    transform: translateY(-1px);
}

.send-message-btn:active {
    transform: translateY(0);
}

.send-message-btn svg {
    width: 22px;
    height: 22px;
    fill: white; 
    transform: rotate(45deg); 
}

.send-message-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}


/* --- Responsive Adjustments for Smaller Screens --- */
@media (max-width: 992px) {
    .messages-main-content-area {
        flex-direction: column; 
        padding: 10px;
        gap: 10px;
    }

    .message-list-column {
        flex: none; 
        max-width: 100%; 
        height: 300px; 
    }

    .message-detail-column {
        flex-grow: 1; 
        min-height: 400px; 
    }
}

@media (max-width: 768px) {
    .header-logo-text, .header-right span {
        display: none; 
    }
    .header-top {
        padding: 10px;
    }
    .nav-icons .nav-item span {
        font-size: 0.75em; 
    }
    .new-message-btn span {
        display: none; 
    }
    .new-message-btn {
        padding: 8px; 
    }
    .detail-actions {
        font-size: 0.75em; 
        gap: 5px;
    }
    .message-detail-header .other-person-name {
        font-size: 1.2em; 
    }
    .message-detail-avatar img {
        width: 40px;
        height: 40px;
    }
    .message-input-area {
        padding: 10px;
        gap: 5px;
    }
    .message-input-area input[type="text"] {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    .send-message-btn {
        width: 40px;
        height: 40px;
    }
    .send-message-btn svg {
        width: 20px;
        height: 20px;
    }
}
/* General styling for settings page container */
        .settings-main-content-area {
            display: flex;
            flex-direction: column; 
            flex-grow: 1;
            padding: 10px; 
            gap: 10px; 
            background-color: var(--light-bg-color);
        }

        /* Styling for individual settings sections */
        .settings-section {
            background-color: var(--card-bg-color);
            color: var(--text-color);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-md);
            padding: 15px; 
            display: flex;
            flex-direction: column;
            gap: 10px; 
        }

        .settings-section-title {
            font-family: var(--font-heading);
            font-size: 1.5em; 
            color: var(--text-color);
            margin-bottom: 10px; 
            text-align: left;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 8px; 
        }

        /* Styling for individual form groups (label + input/select) */
        .settings-form-group {
            display: flex;
            flex-direction: column;
            text-align: left;
            margin-bottom: 8px; 
        }

        .settings-form-group:last-child {
            margin-bottom: 0; 
        }

        /* Label styling */
        .settings-form-group label {
            font-size: 0.8em; 
            color: var(--secondary-text-color);
            margin-bottom: 3px; 
            font-weight: 500;
        }

        /* Styling for all input and select fields */
        .settings-form-group input[type="text"],
        .settings-form-group input[type="email"],
        .settings-form-group input[type="password"],
        .settings-form-group select {
            width: 100%;
            padding: 6px 8px; 
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background-color: #f9f9f9;
            color: var(--text-color);
            font-size: 0.9em; 
            box-sizing: border-box;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23555" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg>');
            background-repeat: no-repeat;
            background-position: right 8px center;
            background-size: 14px;
            cursor: pointer;
        }

        .settings-form-group input[type="password"] {
            background-image: none; 
            cursor: text; 
        }


        /* Placeholder text styling */
        .settings-form-group input::placeholder {
            color: #aaa;
        }

        /* Focus styles for inputs and selects */
        .settings-form-group input:focus,
        .settings-form-group select:focus {
            border-color: var(--primary-orange);
            box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2); 
            outline: none;
        }

        /* Layout for form rows with multiple fields */
        .settings-form-row {
            display: flex;
            gap: 15px; 
            flex-wrap: wrap; 
            margin-bottom: 5px; 
        }

        .settings-form-row .settings-form-group {
            flex: 1;
            min-width: 180px;
            margin-bottom: 0;
        }

        /* Styling for the update buttons */
        .settings-update-button {
            background-color: var(--primary-orange);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 7px 15px;
            font-size: 0.9em;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.1s ease;
            align-self: flex-end;
            margin-top: 8px;
        }

        .settings-update-button:hover {
            background-color: var(--primary-orange-dark);
            transform: translateY(-1px);
        }

        .settings-update-button:active {
            transform: translateY(0);
        }

        /* Message styling for settings page */
        .settings-message-container {
            margin-top: -5px;
            margin-bottom: 10px;
            padding: 6px 12px;
            border-radius: 8px;
            text-align: center;
            font-size: 0.85em;
            width: 100%;
            box-sizing: border-box;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
        }

        .settings-message-container.show {
            opacity: 1;
        }

        .settings-message-container.success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .settings-message-container.error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        /* Responsive adjustments for smaller screens */
        @media (max-width: 768px) {
            .settings-main-content-area {
                padding: 10px;
                gap: 10px;
            }

            .settings-section {
                padding: 15px;
                gap: 10px;
            }

            .settings-section-title {
                font-size: 1.3em;
                margin-bottom: 10px;
            }

            .settings-form-row {
                flex-direction: column;
                gap: 10px;
            }

            .settings-form-row .settings-form-group {
                min-width: unset;
                width: 100%;
            }

            .settings-form-group label {
                font-size: 0.75em;
            }

            .settings-form-group input[type="text"],
            .settings-form-group input[type="email"],
            .settings-form-group input[type="password"],
            .settings-form-group select {
                padding: 7px 9px;
                font-size: 0.85em;
            }

            .settings-update-button {
                padding: 8px 15px;
                font-size: 0.85em;
                align-self: stretch;
            }

            .settings-message-container {
                margin-top: -8px;
                margin-bottom: 10px;
                padding: 7px 12px;
                font-size: 0.8em;
            }
        }
        html, body {
            height: 100%; 
            margin: 0;
            padding: 0;
        }

        body {
            display: flex; 
            flex-direction: column; 
            background-color: var(--light-bg-color); 
            overflow-y: auto; 
            overflow-x: hidden; 
        }


        .profile-main-content-area {
            flex-grow: 1; 
            padding: 20px;
            display: flex;
            flex-direction: column;
            gap: 20px;
            width: 100%; 
            box-sizing: border-box; 
        }

        /* Profile Header Section (Banner, PPF, Name, Stats, Bio) */
        .profile-header-section {
            background-color: var(--card-bg-color); 
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-md);
            padding-bottom: 20px; 
            text-align: center;
            position: relative; 
            overflow: hidden; 
            width: 100%; 
            box-sizing: border-box; 
        }

        .profile-banner {
            width: 100%;
            height: 150px; 
            background-color: #ffd700; 
            background-size: cover;
            background-position: center;
            border-top-left-radius: var(--border-radius);
            border-top-right-radius: var(--border-radius);
            margin-bottom: 50px; 
        }

        .profile-avatar-container {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background-color: #fff; 
            border: 4px solid var(--primary-orange); 
            overflow: hidden;
            position: absolute;
            top: 100px; 
            left: 50%;
            transform: translateX(-50%);
            z-index: 10; 
            box-shadow: var(--shadow-sm);
        }

        .profile-avatar {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .profile-info {
            padding-top: 60px; 
            text-align: center;
        }

        .profile-name {
            font-family: var(--font-heading);
            font-size: 1.8em;
            color: var(--text-color);
            margin-bottom: 5px;
        }


        .profile-stats {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 20px;
        }

        .profile-stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .profile-stat-value {
            font-family: var(--font-heading);
            font-size: 1.3em;
            color: var(--primary-orange);
            font-weight: 600;
        }

        .profile-stat-label {
            font-size: 0.85em;
            color: var(--secondary-text-color);
        }

        .profile-bio {
            font-size: 0.95em;
            color: var(--text-color);
            line-height: 1.5;
            max-width: 700px; 
            margin: 0 auto 20px auto; 
            padding: 0 20px; 
        }

        .profile-edit-buttons {
            display: flex;
            justify-content: center;
            flex-wrap: wrap; 
            gap: 10px;
            margin-top: 15px;
            padding: 0 20px; 
        }

        .profile-edit-btn {
            background-color: var(--primary-orange);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 8px 15px;
            font-size: 0.9em;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.1s ease;
        }

        .profile-edit-btn:hover {
            background-color: var(--primary-orange-dark);
            transform: translateY(-1px);
        }
        .profile-edit-btn:active {
            transform: translateY(0);
        }

        /* Profile Tabs Section */
        .profile-tabs {
            display: flex;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 20px;
            background-color: var(--card-bg-color); 
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-md);
            overflow: hidden; 
            width: 100%; 
            box-sizing: border-box; 
        }

        .profile-tab-item {
            flex: 1;
            text-align: center;
            padding: 15px 0;
            font-family: var(--font-heading);
            font-size: 1em;
            color: var(--secondary-text-color);
            cursor: pointer;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .profile-tab-item.active {
            color: var(--primary-orange);
            border-bottom: 3px solid var(--primary-orange);
            background-color: var(--light-bg-color); 
        }

        .profile-tab-item:hover:not(.active) {
            background-color: var(--hover-bg-color); 
        }

        /* Content Sections for Tabs */
        .profile-content-section {
            background-color: var(--card-bg-color);
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-md);
            padding: 20px;
            display: none; 
            flex-direction: column;
            gap: 15px;
            width: 100%; 
            box-sizing: border-box; 
        }

        .profile-content-section.active {
            display: flex; 
        }

        .content-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 10px;
        }

        .content-title {
            font-family: var(--font-heading);
            font-size: 1.4em;
            color: var(--text-color);
        }

        .create-review-btn { 
            background-color: var(--primary-orange);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 8px 15px;
            font-size: 0.9em;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.1s ease;
        }
        .create-review-btn:hover { 
            background-color: var(--primary-orange-dark);
            transform: translateY(-1px);
        }

        .profile-list-item {
            display: flex;
            align-items: flex-start; 
            gap: 15px;
            padding: 15px 0; 
            border-bottom: 1px solid var(--border-color);
        }

        .profile-list-item:last-child {
            border-bottom: none; 
        }

        .profile-list-item-avatar {
            width: 50px;
            height: 50px;
            border-radius: 8px; 
            object-fit: cover;
            flex-shrink: 0;
            border: 2px solid var(--primary-orange); 
        }

        .profile-list-item-content {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            text-align: left;
        }

        .profile-list-item-name {
            font-family: var(--font-heading);
            font-size: 1.1em;
            color: var(--text-color);
            margin-bottom: 5px; 
        }

        .profile-list-item-text {
            font-size: 0.9em;
            color: var(--secondary-text-color);
            line-height: 1.5;
            margin-bottom: 5px; 
        }

        .profile-list-item-meta {
            font-size: 0.8em;
            color: var(--tertiary-text-color);
            margin-top: auto; 
            text-align: right;
            width: 100%; 
        }


        .modal {
            display: none; 
            position: fixed; 
            z-index: 1000; 
            left: 0;
            top: 0;
            width: 100%; 
            height: 100%; 
            overflow: auto; 
            background-color: rgba(0,0,0,0.6); 
            justify-content: center; 
            align-items: center;
        }

        .modal-content {
            background-color: #fff; 
            margin: auto;
            padding: 30px;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            width: 90%;
            max-width: 500px; 
            position: relative;
            animation: fadeInScale 0.3s ease-out forwards;
        }

        @keyframes fadeInScale {
            from {
                opacity: 0;
                transform: scale(0.9);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border-color);
            padding-bottom: 15px;
            margin-bottom: 20px;
        }

        .modal-title {
            font-family: 'Host Grotesk', sans-serif; 
            font-size: 1.8em;
            color: var(--text-color);
            margin: 0;
        }

        .close-button {
            color: var(--secondary-text-color);
            font-size: 2em;
            font-weight: bold;
            cursor: pointer;
            border: none;
            background: none;
            padding: 0;
            line-height: 1;
            transition: color 0.2s ease;
        }

        .close-button:hover,
        .close-button:focus {
            color: var(--primary-orange);
            text-decoration: none;
        }

        .form-group {
            margin-bottom: 20px;
            text-align: left;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-family: 'Josefin Sans', sans-serif; 
            font-weight: 600;
            color: var(--text-color);
            font-size: 1em;
        }

        .form-group input[type="text"],
        .form-group input[type="url"],
        .form-group textarea,
        .form-group select { 
            width: 100%; 
            padding: 12px 15px;
            font-family: 'Josefin Sans', sans-serif; 
            font-size: 1em;
            color: var(--text-color);
	    background-color: var(--input-bg);
            box-sizing: border-box; 
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
	    border: 1px solid var(--input-border);
        }

        .form-group input[type="text"]:focus,
        .form-group input[type="url"]:focus,
        .form-group textarea:focus,
        .form-group select:focus { 
            border-color: var(--primary-orange);
            box-shadow: 0 0 0 3px rgba(255, 127, 80, 0.2); 
            outline: none;
        }

        .form-group textarea {
            resize: vertical; 
            min-height: 80px;
        }

        .modal-actions {
            display: flex;
            justify-content: flex-end; 
            gap: 10px;
            padding-top: 20px;
            border-top: 1px solid var(--border-color);
            margin-top: 20px;
        }

        .modal-btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            font-size: 1em;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.1s ease;
        }

        .modal-btn.save {
            background-color: var(--primary-orange);
            color: white;
        }

        .modal-btn.save:hover {
            background-color: var(--primary-orange-dark);
            transform: translateY(-1px);
        }

        .modal-btn.cancel {
            background-color: var(--button-bg-color);
            color: var(--text-color);
        }

        .modal-btn.cancel:hover {
            background-color: var(--hover-bg-color);
            transform: translateY(-1px);
        }


        /* Responsive adjustments */
        @media (max-width: 768px) {
            .profile-main-content-area {
                padding: 10px;
                gap: 15px;
            }

            .profile-header-section {
                padding-bottom: 15px;
            }

            .profile-banner {
                height: 120px;
                margin-bottom: 40px;
            }

            .profile-avatar-container {
                width: 80px;
                height: 80px;
                top: 90px;
            }

            .profile-name {
                font-size: 1.5em;
            }


            .profile-stats {
                gap: 20px;
                margin-bottom: 15px;
            }

            .profile-stat-value {
                font-size: 1.1em;
            }

            .profile-stat-label {
                font-size: 0.8em;
            }

            .profile-bio {
                font-size: 0.85em;
                padding: 0 15px;
            }

            .profile-edit-buttons {
                flex-direction: column; 
                align-items: center;
                margin-top: 10px;
                padding: 0 15px;
            }

            .profile-edit-btn {
                width: 100%; 
                padding: 7px 10px;
                font-size: 0.85em;
            }

            .profile-tabs {
                margin-bottom: 15px;
            }

            .profile-tab-item {
                padding: 12px 0;
                font-size: 0.9em;
            }

            .profile-content-section {
                padding: 15px;
                gap: 10px;
            }

            .content-title {
                font-size: 1.2em;
            }

            .create-review-btn { 
                padding: 7px 12px;
                font-size: 0.85em;
            }

            .profile-list-item {
                gap: 10px;
                padding: 10px 0; 
            }

            .profile-list-item-avatar {
                width: 40px;
                height: 40px;
            }

            .profile-list-item-name {
                font-size: 1em;
            }

            .profile-list-item-text {
                font-size: 0.8em;
            }

            .profile-list-item-meta {
                font-size: 0.7em;
            }

            .modal-content {
                padding: 20px;
                width: 95%; 
            }
            .modal-title {
                font-size: 1.5em;
            }
            .form-group label {
                font-size: 0.9em;
            }
            .form-group input[type="text"],
            .form-group input[type="url"],
            .form-group textarea,
            .form-group select { 
                padding: 10px 8px;
                font-size: 0.9em;
            }
            .modal-btn {
                padding: 8px 15px;
                font-size: 0.9em;
            }
        }

