/* Together We Shop - Common Styles */

/* Design System Variables */
:root {
    /* Primary: Bright Tangerine/Orange */
    --primary: #fb8c00;
    /* Hover: Slightly darker orange */
    --primary-hover: #f57c00;
    /* Light: Very pale orange/cream for backgrounds */
    --primary-light: #fff3e0;

    /* Secondary: Fresh Lime/Leaf Green */
    --secondary: #8BC34A;

    /* Background: Cleaner, brighter cream/white */
    --bg: #fffbf2;

    /* UI Elements */
    --text: #2d3436;
    --text-dim: #636e72;
    --card-bg: #ffffff;
    --gray-100: #f1f1e6;
    --gray-200: #e8e4db;
    --gray-400: #a4a490;

    --danger: #ef4444;
    --success: #8BC34A;
    /* Matches secondary lime green */

    --radius: 1.5rem;
    /* Shadows tint updated to Orange */
    --shadow: 0 10px 15px -3px rgba(251, 140, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    touch-action: pan-y;
    overflow-x: hidden;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
}

/* Header Styles */
.header {
    width: 100%;
    background: rgba(253, 250, 246, 0.8);
    backdrop-filter: blur(12px);
    padding: 1.25rem 0;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: "";
    width: 32px;
    height: 32px;
    background: url('../images/TogetherWeShop_Icon_64.png') no-repeat center;
    background-size: contain;
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(212, 106, 77, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(212, 106, 77, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

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

.btn-outline:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    color: var(--danger);
    background: transparent;
    padding: 0.5rem;
    font-size: 1.25rem;
}

/* Google Button */
.btn-google {
    background: white;
    color: #3c4043;
    border: 1px solid var(--gray-200);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    text-decoration: none;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.btn-google.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 2rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active,
.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content,
.modal {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 2rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(212, 106, 77, 0.2);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    margin-bottom: 0.5rem;
}

.modal-header h2,
.modal h2 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.04em;
}

.modal-description {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: var(--text);
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background: var(--danger);
}

.toast.success {
    background: var(--success);
}

/* Dropdown Styles */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    width: 180px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.dropdown.show {
    display: flex;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    text-align: left;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-item.danger {
    color: var(--danger);
}

.dropdown-item.danger:hover {
    background: #fef2f2;
}

/* User Menu */
.user-menu-container {
    position: relative;
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: 2px solid white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.user-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(212, 106, 77, 0.2);
}

.user-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-200);
    width: 200px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.user-info {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--bg);
}

.user-name {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Input Styles */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

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

input[type="text"],
input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    background: var(--bg);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus {
    border-color: var(--primary);
}
