/**
 * Components - UI компоненты
 * Кнопки, инпуты, карточки меню, badges
 */

/* ===============================================
   BUTTONS
   =============================================== */

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 32px;
    color: var(--bg-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 165, 116, 0.4);
}

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

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

.secondary-btn {
    background: var(--bg-surface);
    border: none;
    border-radius: var(--border-radius);
    padding: 14px 24px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

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

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===============================================
   FORM ELEMENTS
   =============================================== */

.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent);
}

.input-field::placeholder {
    color: var(--text-muted);
}

.textarea-field {
    min-height: 120px;
    resize: none;
}

/* Question Input */
.question-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.question-input:focus {
    outline: none;
    border-color: var(--accent);
}

.question-input::placeholder {
    color: var(--text-muted);
}

/* Option Input */
.option-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.option-input:focus {
    outline: none;
    border-color: var(--accent);
}

.option-input::placeholder {
    color: var(--text-muted);
}

/* Select dropdown */
select.input-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b8b8d1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Gender Buttons */
.gender-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.gender-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-surface);
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.gender-btn:hover {
    border-color: rgba(212, 165, 116, 0.3);
}

.gender-btn.active {
    border-color: var(--accent);
    background: rgba(212, 165, 116, 0.1);
}

.gender-btn .icon {
    font-size: 32px;
}

.gender-btn .label {
    font-size: 14px;
    font-weight: 500;
}

/* ===============================================
   MENU ITEMS
   =============================================== */

.menu-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-left: 4px;
}

.menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-surface);
    border: none;
    border-radius: var(--border-radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.menu-item:hover {
    background: var(--primary-light);
    transform: translateX(4px);
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-item-icon {
    font-size: 28px;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.menu-item-content {
    flex: 1;
    min-width: 0;
}

.menu-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.menu-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    flex-shrink: 0;
}

.menu-item-badge.free {
    background: var(--success);
    color: white;
}

.menu-item-badge.price {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ===============================================
   INFO ELEMENTS
   =============================================== */

.hint {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.info-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-banner {
    background: rgba(255, 152, 0, 0.15);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    margin: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.info-banner-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.info-banner-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.info-banner-text strong {
    color: var(--warning);
}

.info-banner p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.banner-btn {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.banner-btn:hover {
    opacity: 0.9;
}

/* ===============================================
   LOADING
   =============================================== */

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 18, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

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

.loading p {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

/* ===============================================
   EMPTY STATE
   =============================================== */

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 14px;
}

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