/* =====================================================
   EWI MT5 Connect — Styles
   ===================================================== */

.ewi-mt5 {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #e6e6e6;
}

.ewi-mt5__card {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 32px;
}

.ewi-mt5__header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ewi-mt5__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ewi-mt5__subtitle {
    font-size: 0.875rem;
    color: rgba(230,230,230,0.5);
    margin: 0;
    line-height: 1.6;
}

.ewi-mt5__field {
    margin-bottom: 20px;
}

.ewi-mt5__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(230,230,230,0.6);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.ewi-mt5__input,
.ewi-mt5__select {
    width: 100%;
    background: #0d1525;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 0.9375rem;
    font-family: inherit;
    padding: 11px 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    appearance: none;
}

.ewi-mt5__input:focus,
.ewi-mt5__select:focus {
    outline: none;
    border-color: #4da3ff;
    box-shadow: 0 0 0 3px rgba(77,163,255,0.12);
}

.ewi-mt5__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8ba8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.ewi-mt5__select option { background: #111827; }

.ewi-mt5__notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(77,163,255,0.06);
    border: 1px solid rgba(77,163,255,0.15);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.8125rem;
    color: rgba(230,230,230,0.6);
    margin-bottom: 24px;
    line-height: 1.5;
}

.ewi-mt5__notice-icon { flex-shrink: 0; font-size: 1rem; }

.ewi-mt5__btn {
    width: 100%;
    background: #4da3ff;
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-size: 0.9375rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.ewi-mt5__btn:hover { background: #6ab4ff; transform: translateY(-1px); }
.ewi-mt5__btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.ewi-mt5__btn--danger {
    background: rgba(255,90,90,0.1);
    color: #ff5a5a;
    border: 1px solid rgba(255,90,90,0.2);
    margin-top: 12px;
}

.ewi-mt5__btn--danger:hover { background: rgba(255,90,90,0.2); transform: none; }

.ewi-mt5__btn--secondary {
    background: rgba(255,255,255,0.05);
    color: #e6e6e6;
    border: 1px solid rgba(255,255,255,0.1);
    margin-top: 12px;
}

/* Connected state */
.ewi-mt5__connected {
    background: rgba(76,175,114,0.06);
    border: 1px solid rgba(76,175,114,0.2);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
}

.ewi-mt5__connected-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ewi-mt5__status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4caf72;
    animation: ewi-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes ewi-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ewi-mt5__status-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #4caf72;
}

.ewi-mt5__account-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8125rem;
}

.ewi-mt5__account-info-item strong {
    display: block;
    color: rgba(230,230,230,0.4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.ewi-mt5__account-info-item span { color: #e6e6e6; font-weight: 600; }

/* Loading */
.ewi-mt5__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-size: 0.875rem;
    color: rgba(230,230,230,0.5);
}

.ewi-mt5__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(77,163,255,0.2);
    border-top-color: #4da3ff;
    border-radius: 50%;
    animation: ewi-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes ewi-spin { to { transform: rotate(360deg); } }

/* Error */
.ewi-mt5__error {
    background: rgba(255,90,90,0.08);
    border: 1px solid rgba(255,90,90,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.875rem;
    color: #ff5a5a;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
}

.ewi-mt5__error-close {
    background: none;
    border: none;
    color: #ff5a5a;
    cursor: pointer;
    margin-left: auto;
    font-size: 16px;
    padding: 0;
    flex-shrink: 0;
}

/* Success */
.ewi-mt5__success {
    background: rgba(76,175,114,0.08);
    border: 1px solid rgba(76,175,114,0.2);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.875rem;
    color: #4caf72;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .ewi-mt5__card { padding: 20px 16px; }
    .ewi-mt5__account-info { grid-template-columns: 1fr; }
}
