/* Mobile Web Styles for iPhone - DiscoLove */

:root {
    /* Congo Love Brand Colors - Matching Android App */
    --primary-color: #005b96;
    --primary-dark: #004070;
    --accent-color: #d4af37;
    --bg-color: #F4F6F8;
    --bg-dark: #0a0a0a;
    --text-color: #121212;
    --text-light: #78909C;
    --border-color: #e3e3e0;
    --white: #ffffff;
    --shadow: 0px 0px 1px 0px rgba(0,0,0,0.03), 0px 1px 2px 0px rgba(0,0,0,0.06);
    
    /* Status colors */
    --status-accepted: #4CAF50;
    --status-pending: #FF9800;
    --status-rejected: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom);
}

/* Safe area for iPhone notch */
@supports (padding: max(0px)) {
    body {
        padding-top: max(0px, env(safe-area-inset-top));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px; /* iOS touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

.btn-secondary {
    background: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-full {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background: var(--white);
    color: var(--text-color);
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px; /* iOS touch target */
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 48, 3, 0.1);
}

.form-error {
    color: var(--primary-color);
    font-size: 14px;
    margin-top: 4px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

/* Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 12px;
    transition: color 0.2s;
    min-width: 60px;
}

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

.nav-item svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* User Card */
.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border-color);
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.user-details {
    font-size: 14px;
    color: var(--text-light);
}

/* Match Card */
.match-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
}

.match-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border-color);
}

.match-info {
    flex: 1;
}

.match-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.match-message {
    font-size: 14px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-time {
    font-size: 12px;
    color: var(--text-light);
}

/* Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    padding-bottom: 80px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.message {
    display: flex;
    margin-bottom: 12px;
    animation: fadeIn 0.3s;
}

.message.sent {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
}

.message.received .message-bubble {
    background: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.message.sent .message-bubble {
    background: var(--primary-color);
    color: var(--white);
}

.message-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-input-container {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.chat-input-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 16px;
    min-height: 44px;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Venue Card */
.venue-card {
    padding: 16px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.venue-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.venue-address {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.venue-distance {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 375px) {
    .container {
        padding: 0 12px;
    }
    
    .card {
        padding: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0a0a0a;
        --text-color: #EDEDEC;
        --text-light: #A1A09A;
        --border-color: #3E3E3A;
        --white: #161615;
    }
}

