/**
 * Components - Evolution Manager Style
 */

/* API Status Indicator */
.api-status {
    position: fixed;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--card-border);
    font-size: 0.75rem;
    z-index: 100;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    animation: pulse 1.5s infinite;
}

.api-status.online .status-dot {
    background: var(--success);
    animation: none;
}

.api-status.offline .status-dot {
    background: var(--error);
    animation: none;
}

.status-text {
    color: var(--text-light);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Input com estilo Evolution */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px dashed var(--input-border);
    border-radius: 8px;
    padding: 4px;
}

.input-wrapper input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    color: var(--text);
    letter-spacing: 0.5px;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    outline: none;
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    border-style: solid;
}

.input-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.saved-key-hint {
    display: block;
    margin-top: 8px;
    color: var(--success);
    font-size: 0.75rem;
}

/* Submit Button - Estilo Evolution */
#submitBtn {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#submitBtn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

#submitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.error,
.success {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    animation: fadeIn 0.3s;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
}

.success {
    background: var(--primary-light);
    border: 1px solid var(--success);
    color: var(--success);
}

.error.show,
.success.show {
    display: flex;
}

/* Status Badge - Estilo Evolution */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 12px 0;
}

.status-badge.connected {
    background: var(--success);
    color: white;
}

.status-badge.disconnected {
    background: var(--warning);
    color: white;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-action {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    background: var(--bg-secondary);
    color: var(--text);
}

.btn-action:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-refresh {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-refresh:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-disconnect {
    background: var(--error);
    color: white;
    border: none;
}

.btn-disconnect:hover {
    opacity: 0.9;
    color: white;
}

/* Support Section */
.support-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

.support-section p {
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: opacity 0.2s;
}

.support-link:hover {
    opacity: 0.8;
}