/* =============================================================================
   Mingo - base.css
   Reset, CSS variables, typography, layout, auth screen
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Reset and Base Styles
   ----------------------------------------------------------------------------- */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* -----------------------------------------------------------------------------
   CSS Variables - Design System
   ----------------------------------------------------------------------------- */
:root {
    /* Colors */
    --primary-color: #FF66C4;
    --primary-hover: #E91E8C;
    --secondary-color: #5f6368;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    
    /* iOS Native Colors */
    --ios-blue: #FF66C4;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-red: #FF3B30;
    --ios-purple: #AF52DE;
    --ios-pink: #FF2D92;
    --ios-teal: #5AC8FA;
    --ios-indigo: #5856D6;
    
    /* Surfaces */
    --background-color: #f3f4f6;
    --surface-color: #FFFFFF;
    --surface-secondary: #F1F3F4;
    --surface-hover: #f3f4f6;
    --ios-background: #f3f4f6;
    --ios-secondary-background: #FFFFFF;
    --ios-tertiary-background: #f3f4f6;
    
    /* Text */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #9aa0a6;
    
    /* Borders */
    --border-color: #e8eaed;
    --border-hover: #dadce0;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --shadow-md: 0 1px 2px 0 rgba(60,64,67,0.3), 0 2px 6px 2px rgba(60,64,67,0.15);
    --shadow-lg: 0 4px 8px 3px rgba(60,64,67,0.15), 0 1px 3px rgba(60,64,67,0.3);
    --ios-shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --ios-shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --ios-shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --ios-radius-small: 8px;
    --ios-radius-medium: 12px;
    --ios-radius-large: 16px;
    --ios-radius-xlarge: 20px;
    
    /* Blur Effects */
    --ios-blur-light: rgba(255, 255, 255, 0.8);
    --ios-blur-dark: rgba(0, 0, 0, 0.4);
}

/* -----------------------------------------------------------------------------
   Typography and Base Elements
   ----------------------------------------------------------------------------- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
    background: var(--ios-background);
    color: var(--text-primary);
    line-height: 1.47;
    font-size: 17px;
    letter-spacing: -0.41px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* -----------------------------------------------------------------------------
   Layout Components
   ----------------------------------------------------------------------------- */

.container {
    max-width: 100%;
    margin: 0;
    background: var(--ios-background);
    min-height: 100vh;
}

.content {
    padding: 2rem;
    padding-bottom: 120px;
    background: #f5f5f5;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .content {
        padding: 12px;
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }

    .tab-content,
    .settings-section-content,
    .pipeline-section,
    .settings-page {
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.hidden {
    display: none !important;
}

/* -----------------------------------------------------------------------------
   Authentication Screen
   ----------------------------------------------------------------------------- */
.auth-container {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: #1F2937;
    box-sizing: border-box;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    margin-bottom: 1rem;
    color: white;
}

.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.auth-header p {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 300;
}

.auth-content {
    background: white;
    padding: 1.75rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
}

.auth-description {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.features-list {
    list-style: none;
    margin-bottom: 1.25rem;
}

.features-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.features-list li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

.google-signin-btn:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.security-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    margin-top: 0.875rem;
}

.auth-copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    margin-top: 1rem;
    text-align: center;
}

/* =============================================================================
   Button Color System
   
   Hover standard: the white gradient overlay in header-nav.css applies to ALL
   .btn elements via ::before. Individual button variants only need to define
   their base background color. Explicit hover overrides are only used where a
   meaningful color shift is intentional (e.g. purple → darker purple).
   
   Do NOT use !important on hover backgrounds — let the overlay do the work.
   ============================================================================= */

/* Global checkbox accent */
input[type="checkbox"] {
    accent-color: #374151;
}

/* Global focus style */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #374151 !important;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.15) !important;
}

/* -----------------------------------------------------------------------------
   Semantic button variants
   ----------------------------------------------------------------------------- */

/* Open Share — blue. Uses !important to permanently win over any section
   or modal-scoped overrides that set .btn-secondary / .btn-small to gray. */
.btn.btn-open-share,
.btn.btn-open-share:link,
.btn.btn-open-share:visited {
    background: #3B82F6 !important;
    color: white !important;
    border: none !important;
}
.btn.btn-open-share:hover {
    background: #3B82F6 !important;
    color: white !important;
    border: none !important;
}

/* Comments — slate gray, explicit darker hover for clear feedback */
.btn.btn-comments {
    background: #4B5563;
    color: white;
    border: none;
}
.btn.btn-comments:hover {
    background: #374151;
    color: white;
}

/* Extend / Purple — purple, explicit darker hover as it's a special action */
.btn.btn-extend-share,
.btn.btn-purple {
    background: #8B5CF6;
    color: white;
    border: none;
}
.btn.btn-extend-share:hover,
.btn.btn-purple:hover {
    background: #7C3AED;
    color: white;
}

/* Preview — blue */
.btn.btn-preview {
    background: #3B82F6;
    color: white;
    border: none;
    box-shadow: var(--ios-shadow-light);
}

/* -----------------------------------------------------------------------------
   Shares tab
   ----------------------------------------------------------------------------- */
#pipeline-shares .btn:not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-secondary) {
    background: #4B5563;
    color: white;
}

#pipeline-shares .btn-secondary {
    background: #4B5563;
    color: white;
    border: none;
}
#pipeline-shares .btn-secondary:hover {
    background: #374151;
    color: white;
}

#newCommentsBtn,
#refreshSharesBtn {
    background: #4B5563;
    color: white;
    border: none;
}

/* -----------------------------------------------------------------------------
   Specific button IDs
   ----------------------------------------------------------------------------- */

/* Refresh buttons — blue */
#sharesRefreshBtn,
#approvalsRefreshBtn,
#archivedRefreshBtn {
    background: #3B82F6;
    color: white;
    border: none;
}

/* Connect Gmail — Gmail red */
#connectGmailBtn {
    background: #EA4335;
    color: white;
    border: none;
}
#connectGmailBtn:hover {
    background: #C5221F;
    color: white;
}

/* Unread recommendations badge */
#unreadRecommendations {
    background: #4B5563;
    color: white;
    border: none;
}

/* -----------------------------------------------------------------------------
   Modal cancel / secondary buttons — dark slate
   ----------------------------------------------------------------------------- */
#createFolderModal .btn-secondary,
#shareConfigModal .btn-secondary,
#addBrandDealModal .btn-secondary {
    background: #4B5563;
    color: white;
    border: none;
}
#createFolderModal .btn-secondary:hover,
#shareConfigModal .btn-secondary:hover,
#addBrandDealModal .btn-secondary:hover {
    background: #374151;
    color: white;
}

/* Settings sections */
#section-custom-branding .btn-secondary,
#section-brand-portal .btn-secondary,
#section-pitch-templates .btn-secondary,
#section-storage .btn-secondary,
#section-feature-requests .btn-secondary {
    background: #4B5563;
    color: white;
    border: none;
}
#section-custom-branding .btn-secondary:hover,
#section-brand-portal .btn-secondary:hover,
#section-pitch-templates .btn-secondary:hover,
#section-storage .btn-secondary:hover,
#section-feature-requests .btn-secondary:hover {
    background: #374151;
    color: white;
}

/* -----------------------------------------------------------------------------
   File card action buttons
   ----------------------------------------------------------------------------- */

/* Non-success/danger file card buttons — gray */
.file-card-actions .btn:not(.btn-success):not(.btn-danger) {
    background: rgba(107, 114, 128, 0.92);
    color: white;
}

/* Edit Tags bulk button */
#bulkTagsBtn:not(:disabled) {
    background: #6B7280;
    color: white;
    border: none;
}

/* Pitch to Brand — red. No explicit :hover so the white gradient overlay
   from header-nav.css .btn::before applies uniformly like all other buttons. */
.create-share-btn.btn-secondary {
    background: #EF4444;
    color: white;
    border: none;
}

/* -----------------------------------------------------------------------------
   Folder icon option selected state
   ----------------------------------------------------------------------------- */
.folder-icon-option.selected {
    background: #374151;
    color: white;
    border-color: #374151;
}

/* -----------------------------------------------------------------------------
   Approvals
   ----------------------------------------------------------------------------- */
#pipeline-approvals .stat-card h4 {
    color: #374151;
}