/* =========================================================
   ATLAS V6 — Order Form & Control Styles
   Unified Color Palette Standard:
   BUY = Green (#4ade80 / #00e676)
   SELL = Red (#f87171 / #ff5252)
   INFO = Blue (#38bdf8)
   WARNING = Amber (#fbbf24)
   ERROR = Crimson (#ef4444)
   ========================================================= */

/* BUY / SELL Segmented Toggle */
.direction-segmented-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

.direction-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.direction-btn.buy.active {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.25), rgba(0, 230, 118, 0.35));
    border-color: #4ade80;
    color: #4ade80;
    box-shadow: 0 0 16px rgba(74, 222, 128, 0.35);
}

.direction-btn.sell.active {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.25), rgba(255, 82, 82, 0.35));
    border-color: #f87171;
    color: #f87171;
    box-shadow: 0 0 16px rgba(248, 113, 113, 0.35);
}

.form-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.field-input, .field-select {
    padding: 0.65rem 0.85rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.field-input:focus, .field-select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue-glow);
}

.field-input.invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4) !important;
}

/* Accordion Extensions */
.accordion-wrapper {
    margin-top: 1rem;
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}

.accordion-header:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.accordion-content {
    display: none;
    padding: 1rem;
    border-top: 1px solid var(--border-glass);
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.accordion-content.open {
    display: grid;
}

/* Dynamic Main Submit Action Button */
.btn-submit-order {
    width: 100%;
    padding: 0.9rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-submit-order.buy {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #000;
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
}

.btn-submit-order.buy:hover {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 6px 25px rgba(74, 222, 128, 0.6);
}

.btn-submit-order.sell {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.btn-submit-order.sell:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 6px 25px rgba(248, 113, 113, 0.6);
}

.btn-submit-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none !important;
}

.action-btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.btn-secondary-action {
    flex: 1;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-danger-action {
    padding: 0.6rem 1rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-danger-action:hover {
    background: rgba(239, 68, 68, 0.25);
}
