//
//  AppSpacing.swift
//  lichunWebsocket
//
//  Consistent spacing and sizing values for the app - Cozy Game UI
//

import CoreGraphics

struct AppSpacing {

    // MARK: - Base Spacing (Increased by ~25%)

    static let xxs: CGFloat = 2
    static let xs: CGFloat = 6      // was 4
    static let sm: CGFloat = 10     // was 8
    static let md: CGFloat = 20     // was 16
    static let lg: CGFloat = 30     // was 24
    static let xl: CGFloat = 40     // was 32
    static let xxl: CGFloat = 60    // was 48
    static let xxxl: CGFloat = 80   // new!

    // MARK: - Component Dimensions (More Generous)

    /// Standard button height
    static let buttonHeight: CGFloat = 54           // was 50

    /// Small button height
    static let smallButtonHeight: CGFloat = 40      // was 36

    /// Standard corner radius
    static let cornerRadius: CGFloat = 16           // was 12

    /// Small corner radius
    static let smallCornerRadius: CGFloat = 10      // was 8

    /// Large corner radius (new for cards)
    static let largeCornerRadius: CGFloat = 24      // was undefined (cornerRadiusLg)

    /// Pill corner radius (fully rounded)
    static let pillCornerRadius: CGFloat = 27       // new!

    // MARK: - Avatar Sizes (Slightly Larger)

    static let avatarSizeSmall: CGFloat = 44        // was 40
    static let avatarSizeMedium: CGFloat = 70       // was 60
    static let avatarSizeLarge: CGFloat = 120       // was 100
    static let avatarSizeXLarge: CGFloat = 180      // was 150

    // MARK: - Card Spacing

    /// Padding inside cards
    static let cardPadding: CGFloat = 20            // was 16

    /// Spacing between cards in lists
    static let cardSpacing: CGFloat = 16            // was 12

    /// Spacing within card content
    static let cardInnerSpacing: CGFloat = 12       // new!

    // MARK: - Icon Sizes

    static let iconSizeSmall: CGFloat = 16
    static let iconSizeMedium: CGFloat = 24
    static let iconSizeLarge: CGFloat = 32
    static let iconSizeXLarge: CGFloat = 44         // new!

    // MARK: - Screen Padding

    static let screenPaddingHorizontal: CGFloat = 16
    static let screenPaddingVertical: CGFloat = 20

    // MARK: - Accessibility

    /// Minimum touch target size for accessibility (Apple HIG)
    static let minTouchTarget: CGFloat = 44

    // MARK: - Header and Navigation

    /// Standard header row height
    static let headerRowHeight: CGFloat = 55

    /// Secondary header row height
    static let headerSecondaryRowHeight: CGFloat = 35

    /// Badge indicator size (small notification dots)
    static let badgeIndicatorSize: CGFloat = 8

    /// Badge with count minimum size
    static let badgeMinSize: CGFloat = 16

    // MARK: - Message Components

    /// Message bubble corner radius
    static let messageBubbleCornerRadius: CGFloat = 22

    /// Message spacer minimum length
    static let messageSpacerMinLength: CGFloat = 50

    // MARK: - Input Components

    /// Input field corner radius
    static let inputCornerRadius: CGFloat = 20

    /// Send button size
    static let sendButtonSize: CGFloat = 44

    // MARK: - Content Limits

    /// Timeline card max height
    static let timelineMaxHeight: CGFloat = 280

    /// Maximum visible events in timeline
    static let timelineEventLimit: Int = 8

    // MARK: - Shadow Constants

    struct Shadow {
        static let radiusSoft: CGFloat = 8
        static let radiusMedium: CGFloat = 12
        static let radiusLarge: CGFloat = 20
        static let offsetY: CGFloat = 4
        static let offsetYLarge: CGFloat = 10
    }
}
