/* builder.css */

.builder-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
}

.builder-options-wrapper {
    background: #eef2f7;
    border: 1px solid #b8cfe5;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.builder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .builder-grid {
        grid-template-columns: 1fr;
    }
}

.option-group h3 {
    margin-top: 0;
    color: #2c3e50;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.option-btn {
    border: 2px solid #ccc;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    background: #fff;
    transition: all 0.2s ease;
}

.option-btn:hover {
    border-color: #8b6f47;
    background: #faf7f2;
}

.option-btn.selected {
    border-color: #8b6f47;
    background: #f9f6f0;
}

.preview-hint {
    text-align: center;
    color: #2563eb;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
}

.preview-area {
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-img {
    max-width: 100%;
    height: auto;
    filter: grayscale(100%);
    transition: opacity 0.3s;
}

.no-selection {
    opacity: 0.4;
}

.order-form {
    max-width: 500px;
    margin: 30px auto 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

.form-input.error {
    border-color: #dc2626;
}

.field-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: #8b6f47;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
}

.submit-btn:hover {
    background: #6a5536;
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn--done {
    background: #16a34a;
}

.status-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: none;
}

.status-ok {
    background: #d1f5dd;
    color: #16a34a;
}

.status-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Модальные окна: оверлей и панель */
.auth-gate-overlay,
.phone-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 10020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-gate-overlay[hidden],
.phone-gate-overlay[hidden] {
    display: none;
}

.auth-gate,
.phone-gate {
    background: #fff;
    border: 2px solid #8b6f47;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}

.gate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.gate-header h3 {
    margin: 0;
    color: #8b6f47;
}

.gate-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.gate-close:hover {
    color: #8b6f47;
}

.gate-text {
    font-size: 14px;
    color: #555;
    margin: 0 0 16px;
}

.gate-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.gate-tab {
    flex: 1;
    padding: 10px;
    border: 2px solid #8b6f47;
    border-radius: 50px;
    background: #fff;
    color: #8b6f47;
    font-weight: 600;
    cursor: pointer;
}

.gate-tab.active {
    background: #8b6f47;
    color: #fff;
}

.gate-error {
    display: none;
    background: #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.gate-alt {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
    text-align: center;
}

/* Пользовательское соглашение: широкое окно на десктопе */
#agreement-gate .auth-gate {
    max-width: 800px;
}

.gate-agreement-body {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 15px;
    color: #444;
    border: 1px solid #e5e0d8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    line-height: 1.6;
}
.gate-agreement-body h1,
.gate-agreement-body h2 {
    font-size: 17px;
    margin: 14px 0 8px;
    color: #2c3e50;
}
.gate-agreement-body h3 {
    font-size: 15px;
    margin: 12px 0 6px;
}
.gate-agreement-body p {
    margin: 8px 0;
}
.gate-agreement-body ul,
.gate-agreement-body ol {
    margin: 8px 0;
    padding-left: 24px;
}

.gate-agreement-actions {
    display: flex;
    gap: 12px;
}
.gate-agreement-actions .submit-btn,
.gate-agreement-actions .gate-decline-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.gate-decline-btn {
    flex: 1;
    padding: 14px;
    background: #f3f0ea;
    color: #6a5536;
    border: 2px solid #8b6f47;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
}
.gate-decline-btn:hover {
    background: #e8e2d6;
}

/* Чекбокс согласия */
.form-group--checkbox .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    line-height: 1.4;
}
.form-group--checkbox .checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}
.form-group--checkbox .checkbox-label a {
    color: #8b6f47;
    text-decoration: underline;
}
