/* ==========================================================================
   WAP Reset & Base Settings
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif; /* Standard WAP Font */
}

body {
    background-color: #e5e8e8; /* Standard WAP outer background */
    color: #000000;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: #0000EE; /* Classic Blue Link */
}

a:hover {
    color: #FF0000; /* Red on hover, very classic */
}

/* ==========================================================================
   Main Layout Container (Centered for Desktop/Tablet)
   ========================================================================== */
.wap-container {
    max-width: 600px; /* Limits width to keep the WAP feel on desktop */
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Soft shadow for desktop separation */
}

/* ==========================================================================
   Headers & Panels
   ========================================================================== */
.wap-logo-bar {
    background-color: #005A9C; /* Deep Blue Header */
    color: #ffffff;
    text-align: center;
    padding: 12px 5px;
    font-weight: bold;
    border-bottom: 3px solid #003366; /* Depth using bottom border */
}

.wap-logo-bar h1 {
    font-size: 18px;
    margin: 0;
}

.wap-user-panel {
    background-color: #EBF5FB; /* Light Blue Panel */
    padding: 8px 10px;
    text-align: center;
    border-bottom: 2px solid #AED6F1;
    font-size: 13px;
    line-height: 1.5;
}

.wap-shoutbox {
    background-color: #FCF3CF; /* Warning/Notice Yellow */
    padding: 8px 10px;
    font-size: 13px;
    color: #7D6608;
    border-bottom: 1px dashed #F1C40F; /* Dashed bottom border for style */
}

/* ==========================================================================
   List Menus (The core of Arawap style)
   ========================================================================== */
.wap-menu-header {
    background-color: #34495E;
    color: #ffffff;
    padding: 6px 10px;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 2px solid #2C3E50;
}

.wap-list {
    display: flex;
    flex-direction: column;
}

.wap-list-item {
    display: block;
    padding: 10px;
    color: #333333;
    background-color: #ffffff;
    border-bottom: 1px solid #D5D8DC; /* Strict bottom border only */
    font-size: 14px;
    font-weight: bold;
}

/* Zebra striping for lists (Classic WAP feature) */
.wap-list-item:nth-child(even) {
    background-color: #F8F9F9;
}

/* Interactive link hover state */
a.wap-list-item:hover, a.wap-list-item:active {
    background-color: #EAECEE;
}

.wap-list-item .icon {
    color: #E74C3C;
    margin-right: 5px;
    font-weight: bold;
}

/* Static items that aren't links */
.wap-list-item.static {
    font-weight: normal;
    color: #555555;
}

/* ==========================================================================
   Specific Item Styles (Badges, Updates, Footer)
   ========================================================================== */
.badge {
    font-size: 10px;
    color: #ffffff;
    padding: 2px 5px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 5px;
}
.badge.red { background-color: #FF0000; }
.badge.blue { background-color: #0000FF; }

.update-item {
    font-size: 13px;
    line-height: 1.4;
}

.update-item .time {
    font-size: 11px;
    color: #999999;
    margin-top: 3px;
}

.wap-footer {
    background-color: #EBF5FB;
    text-align: center;
    padding: 15px 10px;
    font-size: 12px;
    color: #555555;
    border-bottom: 4px solid #AED6F1;
    line-height: 1.8;
}

.wap-footer a {
    font-weight: bold;
}

/* ==========================================================================
   Responsive Logic (100% Device Support)
   ========================================================================== */
/* On mobile (below 600px), it will naturally take 100% width and feel exactly like Arawap */
@media screen and (max-width: 600px) {
    .wap-container {
        width: 100%;
        box-shadow: none; /* Remove shadow on mobile for flat WAP look */
    }
}

/* ==========================================================================
   WAP Forms & Inputs (Login / Register)
   ========================================================================== */
.wap-form-container {
    background-color: #ffffff;
    padding: 15px;
    border-bottom: 2px solid #D5D8DC;
}

.wap-form-group {
    margin-bottom: 15px;
}

.wap-form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #34495E;
    margin-bottom: 5px;
}

/* Strict Border Policy: Only bottom border */
.wap-input {
    width: 100%;
    padding: 8px 5px;
    font-size: 14px;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid #BDC3C7;
    outline: none;
    transition: border-bottom-color 0.3s;
}

.wap-input:focus {
    border-bottom-color: #2980B9; /* Highlights blue on type */
}

/* Classic WAP Button */
.wap-btn {
    width: 100%;
    background-color: #005A9C;
    color: #ffffff;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-bottom: 3px solid #003366; /* Button depth */
    cursor: pointer;
    text-align: center;
}

.wap-btn:active {
    border-bottom-width: 0px;
    transform: translateY(3px);
}

/* Alert Messages */
.wap-alert {
    padding: 10px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid;
    margin-bottom: 10px;
}

.wap-alert.error {
    background-color: #FADBD8;
    color: #C0392B;
    border-bottom-color: #E74C3C;
}

.wap-alert.success {
    background-color: #D4EFDF;
    color: #1E8449;
    border-bottom-color: #27AE60;
}

/* ==========================================================================
   Live Chat Room UI (Old Facebook Style + Match Theme Colors)
   ========================================================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px); /* Keeps chat within screen viewport */
    background-color: #ffffff;
}

.chat-message-board {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #ffffff;
}

.chat-message {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #D5D8DC; /* Separation without side borders */
    font-size: 14px;
    word-wrap: break-word;
}

.chat-message:last-child {
    border-bottom: none;
}

.chat-author {
    color: #005A9C; /* Matches Deep Blue Header */
    font-weight: bold;
    margin-right: 5px;
}

.chat-time {
    color: #999999;
    font-size: 11px;
    margin-left: 5px;
}

.chat-input-wrapper {
    background-color: #EBF5FB; /* Matches Light Blue Panel */
    padding: 10px;
    border-bottom: 2px solid #AED6F1;
}

.chat-input-flex {
    display: flex;
    gap: 5px;
}

.chat-input-flex input[type="text"] {
    flex: 1;
    padding: 8px;
    border: none;
    border-bottom: 2px solid #BDC3C7;
    background-color: #ffffff;
    outline: none;
    font-size: 14px;
    transition: border-bottom-color 0.3s;
}

.chat-input-flex input[type="text"]:focus {
    border-bottom-color: #005A9C;
}

.chat-btn {
    background-color: #005A9C;
    color: #ffffff;
    border: none;
    border-bottom: 3px solid #003366; /* Classic button depth */
    padding: 8px 15px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
}

.chat-btn:active {
    border-bottom-width: 0px;
    transform: translateY(3px);
}

/* ==========================================================================
   Chat Header Links (Fix for dark backgrounds)
   ========================================================================== */
.chat-menu-link {
    color: #ffffff !important; /* Force white text */
    font-weight: bold;
    text-decoration: none;
}

.chat-menu-link:hover {
    color: #AED6F1 !important; /* Light blue on hover */
}

/* ==========================================================================
   User Profile UI (Old Facebook Classic Look)
   ========================================================================== */
.wap-profile-header {
    background-color: #EBF5FB;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #AED6F1; /* Strict bottom border */
}

.wap-avatar-placeholder {
    width: 60px;
    height: 60px;
    background-color: #3b5998;
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    /* No border sides, using modern soft shadow for depth */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}

.wap-profile-name {
    font-size: 16px;
    font-weight: bold;
    color: #005A9C;
    margin-bottom: 5px;
}

.wap-profile-action-bar {
    background-color: #f2f2f2;
    padding: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px solid #cccccc;
}

.wap-profile-btn {
    background-color: #ffffff;
    color: #3b5998;
    padding: 5px 15px;
    font-size: 12px;
    font-weight: bold;
    border: none;
    border-bottom: 2px solid #BDC3C7; /* Depth using bottom border */
    cursor: pointer;
    text-decoration: none;
}

.wap-profile-btn:active {
    border-bottom-width: 0px;
    transform: translateY(2px);
}

/* ==========================================================================
   Global Old Facebook Header & Footer UI
   ========================================================================== */

/* Global Header Bar */
.fb-global-header {
    background-color: #3b5998; /* Classic Facebook Blue */
    padding: 12px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #29487d; /* Strict bottom border only */
}

.fb-logo-text {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff !important;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.fb-nav-links {
    display: flex;
    gap: 12px;
}

.fb-nav-links a {
    color: #ffffff !important;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fb-nav-links a:hover {
    color: #d8dfea !important; /* Lighter blue on hover */
}

/* Global Footer */
.fb-global-footer {
    background-color: #eceff5; /* Classic Light Gray/Blue */
    text-align: center;
    padding: 15px 10px;
    font-size: 12px;
    color: #4b4f56;
    border-bottom: 4px solid #d8dfea;
    margin-top: 20px;
}

.fb-global-footer a {
    color: #3b5998;
    font-weight: bold;
    margin: 0 5px;
    text-decoration: none;
}

.fb-global-footer a:hover {
    text-decoration: underline;
}