/* Component Styles */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-ghost {
    background: transparent;
    color: var(--accent-3);
}

.btn-ghost:hover {
    background: var(--secondary);
    color: var(--primary);
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 18px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

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

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-gradient {
    background: var(--gradient-1);
    color: white;
}

.card-gradient-2 {
    background: var(--gradient-2);
    color: white;
}

.card-gradient-3 {
    background: var(--gradient-3);
    color: white;
}

.card-gradient-4 {
    background: var(--gradient-4);
    color: white;
}

.card-gradient-5 {
    background: var(--gradient-5);
    color: white;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.card-text {
    font-size: 14px;
    color: var(--accent-3);
    line-height: 1.5;
}

/* Aspiration Cards */
.aspiration-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.aspiration-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.aspiration-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    position: relative;
    z-index: 1;
}

.aspiration-description {
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.aspiration-stats {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

/* Wardrobe Item Cards */
.wardrobe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.wardrobe-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.wardrobe-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.item-image-container {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 4:5 aspect ratio */
    background: var(--secondary);
    overflow: hidden;
}

.item-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image-placeholder svg {
    width: 100%;
    height: 100%;
    stroke: var(--accent-2);
}

.item-match-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-badge-high {
    color: var(--success);
}

.match-badge-medium {
    color: var(--warning);
}

.match-badge-low {
    color: var(--error);
}

.item-info {
    padding: var(--space-md);
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-category {
    font-size: 12px;
    color: var(--accent-3);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-family: var(--font-primary);
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 26, 26, 0.05);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 13px;
    color: var(--accent-3);
    margin-top: var(--space-xs);
}

/* Chips/Tags */
.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 6px 12px;
    background: var(--secondary);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chip:hover {
    background: #e0e0e0;
}

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

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Progress Circle */
.progress-circle {
    width: 80px;
    height: 80px;
    position: relative;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: #e5e5e5;
    stroke-width: 8;
}

.progress-circle-fill {
    fill: none;
    stroke: var(--success);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

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

.badge-high {
    background: rgba(123, 166, 138, 0.15);
    color: var(--success);
}

.badge-medium {
    background: rgba(217, 167, 90, 0.15);
    color: var(--warning);
}

.badge-low {
    background: rgba(193, 122, 122, 0.15);
    color: var(--error);
}

.badge-success {
    background: rgba(123, 166, 138, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(217, 167, 90, 0.15);
    color: var(--warning);
}

.badge-error {
    background: rgba(193, 122, 122, 0.15);
    color: var(--error);
}

/* Divider */
.divider {
    height: 1px;
    background: #e5e5e5;
    margin: var(--space-lg) 0;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 28px;
}

/* Icon Button */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--secondary);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
}

/* Camera/Upload Button */
.upload-area {
    width: 100%;
    min-height: 200px;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--secondary);
}

.upload-area:hover {
    border-color: var(--primary);
    background: #f0f0f0;
}

.upload-area.active {
    border-color: var(--primary);
    background: rgba(26, 26, 26, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    stroke: var(--accent-3);
}

.upload-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
}

.upload-hint {
    font-size: 13px;
    color: var(--accent-3);
}

/* Image Preview */
.image-preview {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.image-preview-actions {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    display: flex;
    gap: var(--space-sm);
}

.image-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-action-btn:hover {
    transform: scale(1.1);
}

.image-action-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary);
}

/* Info Icon and Tooltip - Fixed Position */
.info-icon-container-fixed {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.info-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
}

.info-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.info-tooltip {
    position: absolute;
    top: 0;
    left: calc(100% + 16px);
    width: 320px;
    background: linear-gradient(135deg, #F0EBE3 0%, #E8DED2 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    color: var(--primary);
    line-height: 1.6;
}

.info-tooltip::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 100%;
    border: 8px solid transparent;
    border-right-color: #F0EBE3;
}

.info-icon-container-fixed:hover .info-tooltip {
    opacity: 1;
    pointer-events: auto;
}
