/* Broker credential setup guides (Account Broker form) */

.credential-guide-panel {
    margin-top: 0.75rem;
}

.credential-guide-panel__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: #2563eb;
    text-decoration: none;
    cursor: pointer;
}

.credential-guide-panel__toggle:hover {
    color: #1d4ed8;
}

.credential-guide-panel__toggle-icon {
    flex-shrink: 0;
}

.credential-guide-panel__toggle-icon--help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #9ca3af;
}

.credential-guide-panel__toggle-icon--chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.credential-guide-panel__chevron-icon {
    width: 1rem;
    height: 1rem;
}

.credential-guide-panel__toggle-text {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.credential-guide-panel__toggle-text--plain {
    text-decoration: none;
}

.dark .credential-guide-panel__toggle {
    color: #60a5fa;
}

.dark .credential-guide-panel__toggle:hover {
    color: #93c5fd;
}

.dark .credential-guide-panel__toggle-icon--help {
    background: #6b7280;
}

.dark .credential-guide-panel__toggle-icon--chevron {
    color: #9ca3af;
}

.credential-guide-panel__content {
    margin-top: 1rem;
    padding: 1rem 1.125rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    background: #fff;
}

.dark .credential-guide-panel__content {
    border-color: #374151;
    background: rgb(17 24 39 / 0.5);
}

.credential-guide-panel__copy-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.credential-guide-panel__copy-field {
    min-width: 0;
}

.credential-guide-panel__copy-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.dark .credential-guide-panel__copy-label {
    color: #e5e7eb;
}

.credential-guide-panel__copy-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.credential-guide-panel__copy-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #111827;
    background: #f9fafb;
}

.dark .credential-guide-panel__copy-input {
    border-color: #4b5563;
    color: #f9fafb;
    background: #111827;
}

.credential-guide-panel__copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    color: #6b7280;
    background: #fff;
    cursor: pointer;
}

.credential-guide-panel__copy-button:hover {
    color: #2563eb;
    border-color: #2563eb;
}

.dark .credential-guide-panel__copy-button {
    border-color: #4b5563;
    background: #1f2937;
    color: #9ca3af;
}

.credential-guide-panel__copy-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.credential-guide-panel__copy-helper {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #6b7280;
}

.dark .credential-guide-panel__copy-helper {
    color: #9ca3af;
}

[x-cloak] {
    display: none !important;
}

.credential-guide {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.credential-guide__portal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    padding: 0.625rem 1rem;
    border: 1px solid #2563eb;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: #2563eb;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease;
}

.credential-guide__portal-link:hover {
    color: #1d4ed8;
    background: #eff6ff;
}

.dark .credential-guide__portal-link {
    color: #60a5fa;
    border-color: #3b82f6;
    background: rgb(30 58 138 / 0.15);
}

.dark .credential-guide__portal-link:hover {
    color: #93c5fd;
    background: rgb(30 58 138 / 0.3);
}

.credential-guide__portal-link-icon {
    width: 1rem;
    height: 1rem;
}

.credential-guide__steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.credential-guide__step {
    padding: 1rem 1.125rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    background: #f9fafb;
}

.dark .credential-guide__step {
    border-color: #374151;
    background: rgb(17 24 39 / 0.5);
}

.credential-guide__step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.credential-guide__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: #2563eb;
}

.dark .credential-guide__step-number {
    background: #3b82f6;
}

.credential-guide__step-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
}

.dark .credential-guide__step-title {
    color: #f9fafb;
}

.credential-guide__step-list {
    margin: 0;
    padding-left: 1.25rem;
}

.credential-guide__step-item {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #374151;
}

.credential-guide__step-item:last-child {
    margin-bottom: 0;
}

.dark .credential-guide__step-item {
    color: #d1d5db;
}

.credential-guide__step-item strong {
    font-weight: 600;
    color: #111827;
}

.dark .credential-guide__step-item strong {
    color: #f3f4f6;
}

@media (max-width: 767px) {
    .credential-guide-panel__copy-fields {
        grid-template-columns: 1fr;
    }

    .credential-guide__portal-link {
        width: 100%;
        justify-content: center;
    }
}
